+ Reply to Thread
Results 1 to 8 of 8

Filling series column based on if condition

  1. #1
    Registered User
    Join Date
    09-06-2011
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    40

    Filling series column based on if condition

    Hi everyone,

    My problem is the following.. :

    Let's say I have the the cells A-01, A-02, A-03 in cells B1 to B3. If I drag down, Excel will autofill to A-04 A-05 etc..

    What I want is an if condition, such that for example, if the cell adjacent to the series cell is blank, nothing is displayed, and if it is not blank, the series continues.

    IF(A4="","",continue series)

    It's easy enough to do this is if the series is just numerical, but because it contains letters, I can't just seem to do it using:

    IF(A4="","",B3+1), for cell B4..etc.

    Any help is appreciated.

    Thanks!
    Last edited by RedWing; 09-07-2011 at 02:24 PM.

  2. #2
    Registered User
    Join Date
    09-22-2009
    Location
    Cornwall, England
    MS-Off Ver
    Excel 2010 (Work) O365Home (Home)
    Posts
    94

    Re: Filling series column based on if condition

    Please Login or Register  to view this content.

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Filling series column based on if condition

    One way
    In B2 your starting code:= A-01

    In B3
    Please Login or Register  to view this content.
    Drag/Fill Down
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Registered User
    Join Date
    09-06-2011
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Filling series column based on if condition

    Hi Cookstein,

    That works wonderfully. Thanks a lot. I'm not quite sure how it works (reading up on the functions used..!). My only other question would then be, what if I had A-B-1, A-B-2, A-B-3 to sort; in which case the same formula gives a VALUE error.

    Thanks again.

  5. #5
    Registered User
    Join Date
    09-06-2011
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Filling series column based on if condition

    Hi Marcol,

    That works great too, thanks. My only remaining question is getting it to work with A-B-X, where X is a number and A and B can be a mixture, lets say... ABC-D35-X In which case your formula returns a partial fit.

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Filling series column based on if condition

    Hmm ... ?

    That's maybe a bit more complicated, any formula whizz-kids around?

    This should increment any single number in any given string

    In B2 your starting code:= ABC-D35-X
    In B3
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Marcol; 09-07-2011 at 01:59 PM.

  7. #7
    Registered User
    Join Date
    09-06-2011
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Filling series column based on if condition

    Wow, thanks, that is pretty complex.. but unfortunately I did not make myself very clear lol,

    I meant in the sense that ABC-D35-X where X is 1
    ABC-D35-1
    ABC-D35-2
    ABC-D35-3

    etc. Anyway, I will try to work it out from the code you've given but feel free to chime in if you've still got the energy after making that code

    Thanks!

  8. #8
    Registered User
    Join Date
    09-06-2011
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Filling series column based on if condition

    Actually I did a simple refinement of your existing code (for the A-01) and it works great. I will keep that more complex code for later. Thanks again guys.

+ 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