Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Jun 2002
    Location
    Seymour, USA
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Autofill macro (Excel 97)

    I have an excel 97 spreadsheet that i would like to automate. i need a macro to auto fill columns with formulas that are in the 4th row of columns d,h,i,j that act upon data i enter into columns a,b, c, e and f. However, the number of rows of data i enter is not fixed; it could be 50 rows one time and 400 rows the next. I know i can drag the formulas down but it seems a macro would be more efficient.

    Thanks in advance

  2. #2
    5 Star Lounger
    Join Date
    Oct 2002
    Location
    Wellington, Wellington, New Zealand
    Posts
    621
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Autofill macro (Excel 97)

    Doing the autofill is not too hard - what is hard is working out your intention for number of rows to fill

    that is,
    do you already have data in another column that could be detected,
    do you want to select the rows to fill
    do you want to fill from "here" to "end of data"

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Autofill macro (Excel 97)

    Check out the code in <post#=332972>post 332972</post#>

    Steve

  4. #4
    Star Lounger
    Join Date
    Jun 2002
    Location
    Seymour, USA
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Autofill macro (Excel 97)

    To answer your questions in order:
    yes there is data in other columns that can be detected to determine the number of rows that need to be filled
    I do not want to select the rows to fill.
    If I understand your question yes. I want the macro to start on row 4 in several columns and fill to the end of the data based on the formulas that are in row 4 of those columns.

    I hope that helps.

  5. #5
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Autofill macro (Excel 97)

    Does the post I reference do what you want?

    If not, what needs to be modified?

    Steve

  6. #6
    Star Lounger
    Join Date
    Jun 2002
    Location
    Seymour, USA
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Autofill macro (Excel 97)

    Can I also do something like

    Call Autofill ("C1", 1, 3,4,7) ?

  7. #7
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Autofill macro (Excel 97)

    Please do not duplicate questions.

    See my answer at <post#=374245>post 374245</post#>

    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •