+ Reply to Thread
Results 1 to 4 of 4

Increment Cell by one: 2 conditions

  1. #1
    Registered User
    Join Date
    07-16-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    3

    Increment Cell by one: 2 conditions

    I am looking to increment Column A by one, if the corresponding cell in Column B has text.

    It gets tricky as shown in the picture attached / linked at row 9 and 10. B9 and B10 have no text, so A9 and A10 are not incremented.

    The next column with text is B11, so that value in A11 is 9.

    Is there a formula that could do this automatically?

    Thanks guys.
    http://farm6.staticflickr.com/5442/9...f53f5f31_o.png

    excel condition.PNG


    Attachment 250611

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Increment Cell by one: 2 conditions

    In A2

    =IF(B2="","",MAX($A$1:A1)+1)

    copy down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    07-16-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Increment Cell by one: 2 conditions

    Quote Originally Posted by Ace_XL View Post
    In A2

    =IF(B2="","",MAX($A$1:A1)+1)

    copy down
    Hey Ace_XL, thanks for your suggestion.

    I have tried this a few times, but it does not appear to work.

    I must note that the blank cells also contain formulas (but I also tried deleting the formulas - this did not affect the suggestion solution)

  4. #4
    Registered User
    Join Date
    07-16-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Increment Cell by one: 2 conditions

    SOLVED: put a 1 in A1 and then put the formula in A2 and copy it down

    =IF(B2="","",1+LOOKUP(999999,A$1:A1))

+ 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. How to increment a cell's value
    By LUBObe in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 03-15-2013, 08:44 AM
  2. [SOLVED] Increment value of above cell
    By Siops in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-17-2012, 09:33 AM
  3. [SOLVED] Control Button to increment by 1 and then select next cell in row to increment that cell
    By rammergu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-19-2012, 07:35 PM
  4. Increment/Increment letter in alphabetical order
    By Neil Goldwasser in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-25-2006, 05:10 AM
  5. Replies: 4
    Last Post: 08-18-2005, 03:05 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