+ Reply to Thread
Results 1 to 6 of 6

Tricky problem with column reference in formula

  1. #1
    Registered User
    Join Date
    11-14-2008
    Location
    Brooklyn, NY, USA
    Posts
    53

    Question Tricky problem with column reference in formula

    Hi All,
    I'm trying to revise a salary payments workbook that isn't set up so well and I'm struggling with finding a good way to enter payments from an old sheet onto a new sheet. The values (for example) I want to appear on the new sheet are in range C2:AQ2 on the old sheet. Instead of going left-to-right, I want them to appear from top-to-bottom.

    The first formula I wrote was just a simple:
    Please Login or Register  to view this content.
    . I've not been able to figure out how to copy that formula down with the column reference changing. I've tried an index match formula,
    Please Login or Register  to view this content.
    which is not pulling in the right information.

    I think using the INDIRECT function may work best, but I can't quite get that down.

    Any ideas? I wasn't able to attach the sheet, as the upload failed. Thanks in advance.

    Cheers,
    Tim
    Last edited by judasdac; 08-14-2009 at 03:45 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Tricky problem with column reference in formula

    Not sure what your named ranges are referencing...but generally you would use something like

    =INDEX(SHeet2!$C$2:$AQ$2,,ROWS($A$1:$A1)) copied down... replacing only the reference to the SHeet2!$C$2:$AQ$2


    where
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,621

    Re: Tricky problem with column reference in formula

    Suppose you want to put the values in column B; select Column B, enter the formula below in the formula bar.
    Please Login or Register  to view this content.
    Commit the formula with Ctrl+Shift+Enter
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    11-14-2008
    Location
    Brooklyn, NY, USA
    Posts
    53

    Re: Tricky problem with column reference in formula

    Thanks for the quick reply, but I'm still a bit tangled up. I get a #ref error after row47.

    I have two sheets. The sheet I'm trying to populate is Sheet1 while the data is coming from a sheet called OTPerPayroll.

    For each PayDate, there are four types of salary payments:
    8/10/2007 Salaries
    8/10/2007 Fringe
    8/10/2007 Differentials
    8/10/2007 Overtime

    This data is will be in a range that extends from D4:AY171. Currently, I'm only working with overtime, and that begins in D7.

    The formula I'm using now is: =INDEX(OTperPayroll!$C$20:$AQ$20,,ROWS($A$7:$A47)). And that seems to work. However this formula, =INDEX(OTperPayroll!$C$32:$AQ$32,,ROWS($A$7:$A51)), results in a #ref error.

    I'm sure I'm doing something incorrect, but I can't figure it out. I really wish I was to upload the worksheet.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Tricky problem with column reference in formula

    it is because you have pulled down the formula in more rows than there are columns in your indexed range... Ie. there are only 41 columns in range $C$32:$AQ$32 so you can apply the formula to a max of 41 rows..

  6. #6
    Registered User
    Join Date
    11-14-2008
    Location
    Brooklyn, NY, USA
    Posts
    53

    Re: Tricky problem with column reference in formula

    Okay. Thanks for the help :-)

+ Reply to 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