+ Reply to Thread
Results 1 to 13 of 13

Sequences

  1. #1
    Forum Contributor
    Join Date
    02-13-2012
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    105

    Sequences

    Hi,

    I have these sequences displayed in column F - 120723_1

    To create another sequence I have created this formula in column M , =IF(F2="","-",F2&"_"&COUNTIF(F$2:F2,F2)), which gives a value of 120723_1_1

    The problem I am having is that some of the data in column F is blank, giving a value of _ , but column M now sequences these blanks as _1, _2 etc and my formula within another sheet is calling up these incorrect values.

    Is there anything I can do within the original formula to ignore the blanks or is there something I can change in my final formula as follows - =IF($T11="","",IF(ISNA(MATCH($T11&"_"&COLUMN(A$1),'[GRN History (2 Year).xlsx]Sheet1'!$M:$M,0)),"",INDEX('[GRN History (2 Year).xlsx]Sheet1'!$A:$A,MATCH($T11&"_"&COLUMN(A$1),'[GRN History (2 Year).xlsx]Sheet1'!$M:$M,0))))
    Last edited by gtudor; 03-20-2012 at 06:27 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,794

    Re: Sequences

    What formula do you have in column J ?

    It might be easier to answer your query if you posted an example workbook.

    Pete

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sequences

    Maybe:

    =IF(M2="-", "-", YourFormulaHere)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Contributor
    Join Date
    02-13-2012
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    105

    Re: Sequences

    Quote Originally Posted by Pete_UK View Post
    What formula do you have in column J ?

    It might be easier to answer your query if you posted an example workbook.

    Pete
    Sorry ignore J, this should be M

  5. #5
    Forum Contributor
    Join Date
    02-13-2012
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    105

    Re: Sequences

    Quote Originally Posted by JBeaucaire View Post
    Maybe:

    =IF(M2="-", "-", YourFormulaHere)
    Still no luck.

  6. #6
    Forum Contributor
    Join Date
    02-13-2012
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    105

    Re: Sequences

    Snapshot

    Capture.jpg

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sequences

    Maybe:

    =IF(LEN(M2)<5, "", YourFormulaHere)

  8. #8
    Forum Contributor
    Join Date
    02-13-2012
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    105

    Re: Sequences

    Still not luck. Wondering if this is even possible?

  9. #9
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sequences

    Very possible, but we're working blind here. Posting pictures is often useless.

    Make a small sample workbook showing good sample data AND MANUALLY MOCKED UP results so we see what the output should be. Should make things quicker.

    Click GO ADVANCED and use the paperclip icon to post up a copy of your workbook.

  10. #10
    Forum Contributor
    Join Date
    02-13-2012
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    105

    Re: Sequences

    Red cell in column M is where the error is occuring. I do not want the formula to return any value if there is no data in column F.

    Thanks in advance for your help.Sample.xlsx

  11. #11
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sequences

    M14: =if(d14="","-", f14&"_"&countif(f$2:f14,f14))

  12. #12
    Forum Contributor
    Join Date
    02-13-2012
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    105

    Re: Sequences

    Magic - thank you.

  13. #13
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sequences

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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