+ Reply to Thread
Results 1 to 7 of 7

referencing a column value in R part of a R1C1 formula

  1. #1
    Registered User
    Join Date
    10-28-2015
    Location
    BFE, USA
    MS-Off Ver
    2010
    Posts
    30

    referencing a column value in R part of a R1C1 formula

    I have a partial formula but am stumped. Can I reference a row with a column value?

    Cells(r, c).FormulaR1C1 = "=IFERROR(((R(beginning 6000 in column Y)C:R(ending 6000 in column Y)C)*0.085)*R2C,0)

    The formula needs to includes the 2019 (column H) numbers of the light green highlighted categories, major account 6000.00.

    The kicker is that some of the individual stores has an extra category which will add 3 more rows to the 6000 category. I can't go backwards because some of the stores would be -28 rows and some would be -25 rows. This is why I was thinking of using a row reference. The far right hand column has the row number and beginning with that row number, every 3rd row value until the end row, including the end row. I put a formula in column J, row 164 for an example of end result.

    I hope this makes sense and any help will be greatly appreciated. Thank you in advance for your assistance.
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: referencing a column value in R part of a R1C1 formula

    If I understand the request then you should be using a SUMIFS() function

    e.g. ij J164.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And is there a typo since you haven't included J149?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

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

    Re: referencing a column value in R part of a R1C1 formula

    You can also create dynamic named ranges:
    Data_Periods ='103'!$J$4:INDEX('103'!$U:$U,COUNT('103'!$D:$D)+3)
    DataYear ='103'!$H$4:INDEX('103'!$H:$H,COUNT('103'!$D:$D)+3)
    MajorAccountID ='103'!$D$4:INDEX('103'!$D:$D,COUNT('103'!$D:$D)+3)
    pro_rated_inflation ='103'!$J$2:$U$2

    Then:
    Please Login or Register  to view this content.
    Last edited by protonLeah; 12-29-2018 at 08:56 PM.
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    10-28-2015
    Location
    BFE, USA
    MS-Off Ver
    2010
    Posts
    30

    Re: referencing a column value in R part of a R1C1 formula

    I'm not sure I understand correctly. If the ranges have to be created on each sheet then this would virtually be impossible as there are may stores to create all these ranges individually. Is there anyway to achieve this without ranges? I like the sumifs function and I'll work with it to see if I can make this work.

  5. #5
    Registered User
    Join Date
    10-28-2015
    Location
    BFE, USA
    MS-Off Ver
    2010
    Posts
    30

    Re: referencing a column value in R part of a R1C1 formula

    Richard,
    Yes, there is a typo, it does need to be included. Your formula is okay but as I previously stated, J136 isn't always the starting row.

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

    Re: referencing a column value in R part of a R1C1 formula

    Or, instead of writing a formula to the cells, calculate and write the sums with the macro:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-28-2015
    Location
    BFE, USA
    MS-Off Ver
    2010
    Posts
    30

    Re: referencing a column value in R part of a R1C1 formula

    ProtonLeah, works perfect, thanks so much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Functions, R1C1 and referencing cells
    By dl744 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-11-2016, 08:53 AM
  2. R1C1 formula referencing a .csv wokrbook in 2010
    By SHASPEL in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-21-2013, 01:13 PM
  3. Using Range Name reference as part of R1C1 Formula
    By BEEJAY in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-14-2012, 01:32 PM
  4. [SOLVED] Vlookup referencing one column that contains part numbers in both.
    By crafty_girl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-18-2006, 02:35 PM
  5. referencing ranges using R1C1 format
    By pwermuth in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-08-2005, 10:05 PM
  6. [SOLVED] referencing ranges using R1C1 formula:Post a bit more on
    By Danny in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-07-2005, 09:05 PM

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