+ Reply to Thread
Results 1 to 9 of 9

Finding the Row Number with the First Paired Set

  1. #1
    Valued Forum Contributor SDruley's Avatar
    Join Date
    04-27-2009
    Location
    Conover, NC
    MS-Off Ver
    Excel 2010 64 bit
    Posts
    415

    Smile Finding the Row Number with the First Paired Set

    I have two columns of numbers:

    A B
    1
    4
    2
    6
    4
    5 6
    3 3
    2 4
    4 1

    What is an easy way to find the row number that contains the first entry of two numbers. Obviously, the answer is 6 but what is the formula?
    Turn Data into Information
    Turn Information into Knowledge
    Turn Knowledge into Direction
    Turn Direction into Leadership
    Turn Leadership into Results
    Stephen Druley

    It's not how quickly you think
    But how deeply you think
    The quality of thinking is measured
    by remoteness to conformance
    Stephen Druley

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Finding the Row Number with the First Paired Set

    Using your posted data, beginning in cell A1...
    This formula returns the row number of the first pair of numeric values:
    Please Login or Register  to view this content.
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,054

    Re: Finding the Row Number with the First Paired Set

    Or this:

    =INDEX(A:A,MIN(IFERROR(MATCH($B$5:$B$8,$A$1:$A$100,0),"")))

    (comfirmed with ctrl+shift+enter)
    Attached Files Attached Files
    Never use Merged Cells in Excel

  4. #4
    Registered User
    Join Date
    11-22-2010
    Location
    Finland
    MS-Off Ver
    Excel 2003, 2007
    Posts
    95

    Re: Finding the Row Number with the First Paired Set

    Or if the data is always like this - unbroken one column rows followed by unbroken two column rows - : =COUNT(A1:A9)-COUNT(B1:B9)+1
    An example file is never useless!

    Tried an example function of mine and got errors?
    - Had you found them, replace ; with , and , with .

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,054

    Re: Finding the Row Number with the First Paired Set

    Hi KiPA...

    Your formula will always return number 6, no matter of inputs... as long as there are all numbers...

  6. #6
    Registered User
    Join Date
    11-22-2010
    Location
    Finland
    MS-Off Ver
    Excel 2003, 2007
    Posts
    95

    Re: Finding the Row Number with the First Paired Set

    Really? Works for me. Maybe I'm just tired and the whole thing went beyond my brain functions.

    Edit: actually I can't get your formula working. All I can get is... something. The value even changes if I delete some number in B column and add it again.
    Last edited by KiPA; 11-26-2010 at 06:44 PM.

  7. #7
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Finding the Row Number with the First Paired Set

    I'm not sure if this makes a difference to the poster, but the request was for the Row Number...not the position in the list.

    Using the formulas I'm seeing posted, their return values coincidentally match the row numbers only if the data begins in Row_1. The formula I posted returns the row number, no matter which row is the start of the data.

  8. #8
    Valued Forum Contributor SDruley's Avatar
    Join Date
    04-27-2009
    Location
    Conover, NC
    MS-Off Ver
    Excel 2010 64 bit
    Posts
    415

    Re: Finding the Row Number with the First Paired Set

    Thanks to everyone who contributed to this query. It is amazing how many different solutions there are for a given situation. All solutions worked.

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,054

    Re: Finding the Row Number with the First Paired Set

    Quote Originally Posted by Ron Coderre View Post
    I'm not sure if this makes a difference to the poster, but the request was for the Row Number...not the position in the list..
    Hm, I guess you are right Ron...

+ 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