+ Reply to Thread
Results 1 to 7 of 7

How to Auto Increment the ROWS Function Horizontally

  1. #1
    Forum Contributor
    Join Date
    04-23-2014
    Location
    United Kingdom
    MS-Off Ver
    Microsoft 365
    Posts
    149

    How to Auto Increment the ROWS Function Horizontally

    Hi, is there a way of making this formula so the ROWS bit at the end increases by one with each cell I drag it to (horizontally)? This works vertically but not horizontally. I did have a list of numbers in another block of cells and tried using the INDIRECT function but to no avail.

    =IFERROR(LARGE(IF($D$2:$D$31=$M$35,$C$2:$C$31),ROWS($1:1)),"—")
    Last edited by Statto; 07-21-2014 at 04:14 PM.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: How to Auto Increment the ROWS Function Horizontally

    If you want that to incriment as the formula is dragged horizontally, use the COLUMNS function instead of ROWS

    =IFERROR(LARGE(IF($D$2:$D$31=$M$35,$C$2:$C$31),COLUMNS($A:A)),"—")

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: How to Auto Increment the ROWS Function Horizontally

    Have you tried using COLUMNS?
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to Auto Increment the ROWS Function Horizontally

    Use the COLUMNS( ) function.

    Typically, you want to use the cell address of the first cell that the formula is entered in. For example, if the first cell the formula is entered in is cell B2 then use:

    =IFERROR(LARGE(IF($D$2:$D$31=$M$35,$C$2:$C$31),COLUMNS($B2:B2)),"—")

    If the first cell the formula is entered in is cell H25 then use:

    =IFERROR(LARGE(IF($D$2:$D$31=$M$35,$C$2:$C$31),COLUMNS($H25:H25)),"—")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Contributor
    Join Date
    04-23-2014
    Location
    United Kingdom
    MS-Off Ver
    Microsoft 365
    Posts
    149

    Re: How to Auto Increment the ROWS Function Horizontally

    Thanks guys. Much easier solution you gave than I thought it would be.

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: How to Auto Increment the ROWS Function Horizontally

    You're welcome.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to Auto Increment the ROWS Function Horizontally

    You're welcome. Thanks for the feedback!

+ 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. Replies: 5
    Last Post: 05-09-2013, 09:39 AM
  2. Auto increment Rows Number in a column using VB
    By chancw in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-04-2012, 01:28 PM
  3. Using Auto complete horizontally
    By DWJ in forum Excel General
    Replies: 7
    Last Post: 03-11-2010, 05:57 PM
  4. Can I auto-filter horizontally?
    By taketwo in forum Excel General
    Replies: 2
    Last Post: 08-06-2009, 12:07 PM
  5. Auto Increment Rows in between numbers
    By D in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-28-2005, 01:06 PM

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