+ Reply to Thread
Results 1 to 2 of 2

Using named variables with R1C1 formatting?

  1. #1
    Registered User
    Join Date
    11-11-2012
    Location
    Macon, GA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Using named variables with R1C1 formatting?

    Is it possible to mix named ranges and FormulaArray (R1C1 formatting)?

    I have a macro that enters a complex formula:

    formula Selection.FormulaArray = _
    "=IF(ISERROR(INDEX('Class Schedule'!C[-8]:C[-6],SMALL(IF('Class Schedule'" _
    & "!C[-8]=RC8,ROW('Class Schedule'!C[-8])),ROW(R[-3]),3)),"""",INDEX('Class Schedule'" _
    & "!C[-8]:C[-6],SMALL(IF('Class Schedule'!C[-8]=RC8,ROW('Class Schedule'!C[-8])),ROW(R[-3])),3))"

    Instead of Row[-3], I need the underlined portions to reference the first row of the sheet. However, I can't use R1 because I need to fill this formula down and have the row value increment. But I can't figure out how to replace Row[-3] with a reference to myRow or something.

    Any help would be appreciated.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Using named variables with R1C1 formatting?

    ROW() returns the row number of the cell containing the formula. Is that what you mean?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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