+ Reply to Thread
Results 1 to 6 of 6

Formula to do number and extract values

  1. #1
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Formula to do number and extract values

    Looking for formula (non-array preferred) to look into column B2:B13, starting with B2=34. The formula will place B2=34 into E2 and then count B2=34 down until it gets to 1 (that is 34, 33, 32.......1). A second formula will extract Code values in column C into column F. The next row below 1 (E36) will be the new starting row for B3, which is 35. The formula will repeat this iteration until it gets to B13.

    Note: the values in B2:B13 are manually entered and could change. Meaning I could decide to change B2=34 to B2=37.

    Desired outcome in column E2:E402 and F2:402.

    See sample file. Thanks

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Formula to do number and extract values

    in d2

    0 (zero)

    in d3

    =SUM($B$2:B2)+1

    Copy down

    in F2

    =INDEX($C$2:$C$13,MATCH(ROWS($1:1),$D$2:$D$14,1))

    copy down


    in E2 (Updated)

    =INDEX($B$2:$B$13,MATCH($F2,$C$2:$C$13,0))-COUNTIF($F$2:$F2,$F2)+1
    Last edited by JohnTopley; 07-25-2021 at 10:39 AM.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Formula to do number and extract values

    Better ..See previous post

    in E2

    =INDEX($B$2:$B$13,MATCH($F2,$C$2:$C$13,0))-COUNTIF($F$2:$F2,$F2)+1
    Last edited by JohnTopley; 07-26-2021 at 01:27 AM.

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Formula to do number and extract values

    In E2
    Please Login or Register  to view this content.
    In F2
    Please Login or Register  to view this content.
    Both copied down till blank results are seen.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Re: Formula to do number and extract values

    kvsrinivasamurthy: excellent solution. Thanks a lot.

  6. #6
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Re: Formula to do number and extract values

    JohnTopley: Outstanding solution. Thanks a lot.

+ 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. [SOLVED] Extract distinct text values with number of occurrences of each
    By Prabhakar1 in forum Excel General
    Replies: 7
    Last Post: 02-03-2021, 11:52 AM
  2. Replies: 3
    Last Post: 01-13-2021, 06:33 PM
  3. Extract Values Between a Number Range
    By MotleyCG in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-04-2020, 03:29 PM
  4. [SOLVED] Extract rows for duplicate K values with AT different Number
    By Sekars in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-21-2019, 12:03 AM
  5. Need to extract numbers from a cell and convert to number values. Please help.
    By Eclipsemints in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2014, 06:00 PM
  6. extract number values from a table and make a list
    By mischge in forum Excel General
    Replies: 27
    Last Post: 08-14-2013, 04:00 AM
  7. extract the top 6 values in an increasing number of values
    By s1dlaw in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-21-2007, 09:19 AM

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