+ Reply to Thread
Results 1 to 21 of 21

Need last 4 digit

  1. #1
    Registered User
    Join Date
    03-18-2021
    Location
    india
    MS-Off Ver
    2019
    Posts
    15

    Thumbs up Need last 4 digit

    dear friends
    I have a list from 0 to 9 randomly digits like 120123425637804563021099108767
    this list may be long or may be short list in different rows. I want last 4 digit in this list from 0 to 9 like 2345 result from this list.
    see attached file you can understand better.
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Need last 4 digit

    Total confusion. Please explain WHY 1238 is your expected answer!!
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    03-18-2021
    Location
    india
    MS-Off Ver
    2019
    Posts
    15

    Re: Need last 4 digit

    dear glenn kennedy
    cause we find 045679 early from 1238 in my list.
    conclusion 1238 result digit 1 2 3 8 are 7 and 8 and 9 and 10th position in my random list.
    got it. every time I want 7th 8th 9th 10th position in my result skip repeated digit.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Need last 4 digit

    That makes absolutely no sense at all.

    I thought (at first) you meant you wanted the last four digits to appear for the first time... which would be 4,0, 1 & 9.

    I can see absolutely NO pattern which would give 1,2,3 8 as an answer. You will have to try again to explain.

  5. #5
    Registered User
    Join Date
    03-18-2021
    Location
    india
    MS-Off Ver
    2019
    Posts
    15

    Re: Need last 4 digit

    sorry glenn kennedy
    a mistake in my sample file.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-18-2021
    Location
    india
    MS-Off Ver
    2019
    Posts
    15

    Re: Need last 4 digit

    dear glenn kennedy
    now you can better understand with my problem.
    pls find new attached file.
    thanks
    Attached Files Attached Files
    Last edited by MUKESH KUMAR DUA; 03-24-2021 at 02:40 PM.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Need last 4 digit

    With a helper:
    =LOOKUP(2,1/($A$2:$A$22=COLUMNS($D13:D13)-1),ROW($A$2:$A$22))

    copied across,

    =INDEX(ROW($1:$10)-1,MATCH(LARGE($D$13:$M$13,{7,8,9,10}),$D$13:$M$13,0))You seem to be using an older version of Excel than me. So, please refer to the attached file. If the formulae are enclosed within a pair of { }, these are array formulae.

    These are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see the curly brackets { } appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    03-18-2021
    Location
    india
    MS-Off Ver
    2019
    Posts
    15

    Re: Need last 4 digit

    dear glenn
    first of all thanks for your early response.
    you skip my first condition that I don't know how long data I have . your reply match with my required result but only for this one. with a helper it may be converted in very large file if I have long data. it confuse me. your efforts for my solution is good. find another way to solve my problem. once again I am very thankful for your help.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Need last 4 digit

    Well, no. I did NOT skip it. All you need to do iscahange the bits in red:


    =LOOKUP(2,1/($A$2:$A$22=COLUMNS($D13:D13)-1),ROW($A$2:$A$22))

    to suit. Alternatively, you could use a dynamic named range (CTRL-F3), here called "Range", using:

    $A$2:INDEX($A:$A,MATCH(10^100,$A:$A))

    to auto-adjust the formula, which then becomes:

    =LOOKUP(2,1/(Range=COLUMNS($D13:D13)-1),ROW(Range))

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    03-18-2021
    Location
    india
    MS-Off Ver
    2019
    Posts
    15

    Re: Need last 4 digit

    look my sample file and solve
    Attached Files Attached Files
    Last edited by MUKESH KUMAR DUA; 03-25-2021 at 12:30 PM. Reason: file attached missing

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Need last 4 digit

    Which file? In what way does my formula NOT work?

    Also... a "Please" is nicer than a command!!!

  12. #12
    Registered User
    Join Date
    03-18-2021
    Location
    india
    MS-Off Ver
    2019
    Posts
    15

    Re: Need last 4 digit

    attached file update look it you understand better.

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Need last 4 digit

    So... In your FIRST post you said you had A list (singular). Now you tell us that you have MULTIPLE lists.

    That was a very major gap in the information you were giving us, don't you think??

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Need last 4 digit

    So.. just how many lists DO you have?

  15. #15
    Registered User
    Join Date
    03-18-2021
    Location
    india
    MS-Off Ver
    2019
    Posts
    15

    Re: Need last 4 digit

    I understand but never think you use a helper so the problem create. I have no intention to bother any one.
    sorry big brother.

  16. #16
    Registered User
    Join Date
    03-18-2021
    Location
    india
    MS-Off Ver
    2019
    Posts
    15

    Re: Need last 4 digit

    this Is the only list

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Need last 4 digit

    Now I am completely confused. What are columns B, C, D & E if they are NOT four lists?

  18. #18
    Registered User
    Join Date
    03-18-2021
    Location
    india
    MS-Off Ver
    2019
    Posts
    15

    Re: Need last 4 digit

    hey glenn don't be confused there are four column data and I want all column result (last 4 digit as you know very well ). in my sample file I manually type result H76 AND I76 AND J76 AND K76. In the next row result are changed due to increase data upto 1 row like 77 row . need continues result with function or formula all in 4 columns.
    Attached Files Attached Files

  19. #19
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Need last 4 digit

    Back again....

    1. Some of your numbers are TEXT that look like numbers. This is a common problem. Select column A. Data/Text to numbers/Finish. repeat for columns B, C & D separately. It has been done on this sheet. it's always a good idea to check that if you increase the decial places.... that they do change!!

    2. 4 Named ranges, one for each column, as previously. In I2, an array fromula, coped across and down:

    =INDEX(ROW($1:$10)-1,MATCH(SMALL($O2:$X2,COLUMNS($I2:I2)),$O2:$X2,0))

    The formulae in the file are enclosed within a pair of { }, these are array formulae.

    These are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see the curly brackets { } appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...

    Add more (real) numbers at the foot of the table and the results will update.

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.
    Attached Files Attached Files

  20. #20
    Registered User
    Join Date
    03-18-2021
    Location
    india
    MS-Off Ver
    2019
    Posts
    15

    Re: Need last 4 digit

    excellent job done by you. I am very thankful to you.

  21. #21
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Need last 4 digit

    You're welcome and 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. Color a single digit in a mult-digit number cell
    By Phyllis in forum Excel General
    Replies: 8
    Last Post: 09-30-2022, 04:22 PM
  2. [SOLVED] Extract 1, 2 or 3-digit Numbers from Text String but Ignore 4-Digit Dates
    By S_Rycroft in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-09-2020, 12:03 PM
  3. Replies: 6
    Last Post: 02-03-2019, 06:05 AM
  4. Bank Recon - How to convert 8 digit formatted check numbers to 6 digit
    By Quisp in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-21-2017, 09:55 PM
  5. Macro to identify 3-digit and 4-digit numbers as valid dates
    By gojakie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-16-2015, 08:16 AM
  6. [SOLVED] LOTTERY FILTER#4, Find if 1 Digit Sum of 2 Digit or 3 Digit, Single Cell w/ dash
    By david gonzalez in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-08-2014, 12:57 AM
  7. Replies: 2
    Last Post: 06-17-2010, 08:36 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