Closed Thread
Results 1 to 3 of 3

Having Trouble with Autofilling Across Columns

  1. #1
    Registered User
    Join Date
    09-26-2012
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007
    Posts
    14

    Having Trouble with Autofilling Across Columns

    Hi all,

    I am having an issue with a formula. I would like to have this formula in C4:
    =IF(VLOOKUP(C$1, PasteSheet!$1:$1048576, 20, FALSE) < RunMatrix!$B4, IF(VLOOKUP(C$1, PasteSheet!$1:$1048576, 21, FALSE) > RunMatrix!$B4, PasteSheet!$Q2, ""), "")

    turn into this in the next column D4:

    =IF(VLOOKUP(D$1, PasteSheet!$1:$1048576, 20, FALSE) < RunMatrix!$B4, IF(VLOOKUP(C$1, PasteSheet!$1:$1048576, 21, FALSE) > RunMatrix!$B4, PasteSheet!$Q3, ""), "")

    then this in the next column E4:

    =IF(VLOOKUP(E$1, PasteSheet!$1:$1048576, 20, FALSE) < RunMatrix!$B4, IF(VLOOKUP(C$1, PasteSheet!$1:$1048576, 21, FALSE) > RunMatrix!$B4, PasteSheet!$Q4, ""), "")

    Basically, the problem I am having is being able to have the last command --, PasteSheet!$Q2, ""), "") change to PasteSheet!$Q3, ""), "") etc. as I autofill across columns.

    Currently, when I autofill across the columns, the -- PasteSheet!$Q2, ""), "") just maintains $Q2 instead of swithcing to $Q3 then $Q4 etc.

    Should I incorporate an indirect command?

    Thanks in advance for any help.

  2. #2
    Forum Contributor dogberry's Avatar
    Join Date
    07-15-2012
    Location
    Wales, UK
    MS-Off Ver
    Excel 2010
    Posts
    624

    Re: Having Trouble with Autofilling Across Columns

    Hi

    Have you tried inserting a temporary row above your table and numbering the columns Column B would be 2 column C 3 etc to end of range. Then instead of specifying 2 as the column to return you can point to the B1 cell press your F4 twice to change it to B$1.


    Chris
    Click my star if I helped Thanks

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Having Trouble with Autofilling Across Columns

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1