+ Reply to Thread
Results 1 to 2 of 2

SUMIF - Reference cell value in a formula?

  1. #1
    Registered User
    Join Date
    08-13-2010
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    1

    SUMIF - Reference cell value in a formula?

    Is there a way to reference the value in a cell as part of a formula, like SUMIF?

    Example:
    Sumif in 1st worksheet in cell B5 sums colum A in 2nd worksheet (..,...,A1:A50).
    On 1st worksheet, I'd like to enter "B" (or a range name) in cell A1.
    The SUMIF formula in cell B5 referencing the "B" in cell A1 on the 1st worksheet changes the SUMIF formula to (...,...,B1:B50)

    Any help would be greatly appreciated!

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: SUMIF - Reference cell value in a formula?

    If you use letters to identify the column then realistically you're looking at using INDIRECT which will make your SUMIFs Volatile
    (there are workarounds to the INDIRECT requirement but they're cumbersome)

    Far better to store the column integer (ie 1 for A, 27 for AA etc..) as opposed to the letter, at which point you can use INDEX to create the sum_range in the SUMIF

    =SUMIF(...,...,INDEX(Sheet2!$1:$50,0,$A$1))

    this will sum rows 1 to 50 in the column identified in A1
    (to reiterate, where A1 is the column number rather than letter)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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