+ Reply to Thread
Results 1 to 2 of 2

can excel return sequential numbers in an IF statement?

  1. #1
    Registered User
    Join Date
    07-28-2008
    Location
    California
    Posts
    1

    can excel return sequential numbers in an IF statement?

    I am wondering if Excel has an easy way to return sequential numbers for a FALSE If statement.
    My working formula is =IF(ID#=0,"",{1,2,3...}) where {1,2,3...} would be sequential numbers.
    ie.

    ID#
    0
    0
    72408003
    0
    72408005
    0
    0
    72408008

    Ultimately I would like the next column to return something like this:
    ID#
    0
    0
    72408003 1
    0
    72408005 2
    0
    0
    72408008 3

    I am not that great at excel, so any help would be very useful.

    Thanks!

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    Try this in B1 copied down

    =IF(IF(A1=0,"",ROW())="","",IF(A1=0,"",ROW())*1-COUNTIF($A$1:A1,0))
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

+ 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