+ Reply to Thread
Results 1 to 7 of 7

Find number in position 'x'

  1. #1
    Registered User
    Join Date
    03-21-2010
    Location
    New Zealand
    MS-Off Ver
    Excel 365
    Posts
    48

    Find number in position 'x'

    I need to find the following

    I have a continuous group of numbers - say ...

    21,5,14,61,27,85,2,14,21,5,14,61,27,85,2,14,21,5,14,61,27,85,2,14,21,5,14,61,27,85,2,14

    if 21 is my last number and I want to know what number is '5 spaces' along. How do I formulate this?

    The answer I want is 85

    my number is 2 what number is '3 spaces' further along. How do I formulate this?

    The answer I want is 5

    Thanks in anticipation.

    This forum is great!

    Cheers Sedge.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Find number in position 'x'

    UDF

    =FindNumber(A1,21,5)

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-21-2010
    Location
    New Zealand
    MS-Off Ver
    Excel 365
    Posts
    48

    Re: Find number in position 'x'

    Thanks Jindon.

    I need further help please.

    Having difficulty getting this to work. Not too familiar with macros :-)

    Let me say again what I am after.
    I have a continous series of numbers 21,5,14,61,27,85,2,14,21,5,14,61,27,85,2,14,21,5,14,61,27,85,2,14,21,5,14,61,27,85,2,14

    I wish to input my number (which changes every time) start with 21, I input then the space for the next number, in the example I input '5'. This give me '85'.

    Next I might have 61 as my number. I input the target space say 7 and am given 14 as the number. and so on.

    is there a way to have the target number appear automatically after the space number is input, with out having to run the macro each time?
    Can this be done with a standard formula??

    Thanks again
    Cheers Sedge

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Find number in position 'x'

    Not sure about "Automatically", though

    If you place Last Number in A2, Space in B2 respectively, =FindNumber(A1,A2,B2) should give you the result.

    Is this how you wanted?

  5. #5
    Registered User
    Join Date
    03-21-2010
    Location
    New Zealand
    MS-Off Ver
    Excel 365
    Posts
    48

    Re: Find number in position 'x'

    Jindon, Sounds like what I am after, but I'm a newbie re macros.
    I have cells A1-X1 populated with

    21 5 14 61 27 85 2 14 21 5 14 61 27 85 2 14 21 5 14 61 27 85 2 14

    In cell A2 I have 21 and cell B2 I have 5 ....

    I am having trouble loading macro. Can you talk me through it please.

    Thanks again

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Find number in position 'x'

    It will be a different story...

    If you put LastNumber in A2, Space in B2

    =INDEX(A1:X1,1,MATCH(A2,A1:X1,0)+B2)

    Does this work?
    Last edited by jindon; 09-04-2012 at 10:02 PM.

  7. #7
    Registered User
    Join Date
    03-21-2010
    Location
    New Zealand
    MS-Off Ver
    Excel 365
    Posts
    48

    Re: Find number in position 'x'

    YES YES YES!! Thankyou soo much.

+ 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