+ Reply to Thread
Results 1 to 7 of 7

If cell is not blank, insert number

  1. #1
    Registered User
    Join Date
    09-25-2006
    Posts
    12

    If cell is not blank, insert number

    I'm trying to create a formula that, based on input, will increase the number next to it.

    so, if B1 has text, then A1 will say "1. "
    if B2 has text, then A2 will say "2. "

    thanks for any assistance

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =IF(B1<>"",COUNTIF($B$1:$B1,"<>")&".","")

    copied down
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    09-25-2006
    Posts
    12
    That works very well!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    This should work too.

    =IF(B1<>"",COUNTA($B$1:$B1)&".","")

  5. #5
    Registered User
    Join Date
    09-25-2006
    Posts
    12
    Thank you.

    Can you help me understand the $B$1 portion of it? what are the dollar signs for?

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    The $ makes the cell reference absolute (i.e. it "freezes" it) so that when you copy down the formula, it always references the top of the range to be B1. The formula counts always from B1 to the current row (notice no $ in front of the 1 in the reference to the bottom of the range)...this changes as you copy down.

  7. #7
    Registered User
    Join Date
    09-25-2006
    Posts
    12
    Awesome, Thanks for the information

+ 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. workdays additions and cell number display
    By XLS-EXCEL in forum Excel General
    Replies: 7
    Last Post: 09-07-2007, 08:05 AM
  2. Vlookup a value if blank cell found after meeting two other criteria
    By markmac234 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-28-2007, 06:15 PM
  3. copying various cells in ot different cells in a different sheet
    By MonkeyDeath in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-25-2007, 11:22 AM
  4. Replies: 4
    Last Post: 07-18-2007, 05:39 PM
  5. Variable Cell Number?
    By talR in forum Excel General
    Replies: 1
    Last Post: 06-28-2007, 09:45 AM

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