View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default Need to number but skip blank rows

Put 150 in A1, and then put this formula in A2:

=IF(COUNTIF(B$1:B2,B2)=1,A$1+COUNT(A$1:A1),"")

and copy it down as far as you need to.

Hope this helps.

Pete

On Aug 19, 1:21*am, FJ wrote:
Hi, I am trying to number rows in column A using a formula. *The numbering
should start with 150, not 1. *The problem is that I only want the rows
numbered if the values in column B are unique. *When I say “unique”, any
duplicate entries would be right on top of each other as shown below. *The
list is already sorted. *Here is an example of what I would like the
numbering to look like:

A * * * B
150 * * Apples
151 * * Oranges
* * * * Oranges
152 * * Pears
* * * * Pears
* * * * Pears
153 * * Lemons
154 * * Limes

I’ve played around with formulas using IF and COUNTIF, but so far I haven’t
had much success. *I know this is probably simple, but so far I haven’t been
able to figure it out.

Thanks in advance for any help.