Thread: Counting Macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone[_2_] Jim Cone[_2_] is offline
external usenet poster
 
Posts: 1,549
Default Counting Macro


F1 has the number you are looking for.
B2 contains this formula... =IF(A2=$F$1,COUNTIF($A$2:A2, $F$1),"")
Fill the formula down column B
--
Jim Cone
Portland, Oregon USA




"MCheru"
wrote in message
Every cell in Column A starting in row 2 is filled with seven digit numbers.
Often times each seven digit number will occur more than once. I want to
create a macro that covers every cell in Columns A:B starting in row 2 so
that if I have a seven digit number that appears for the first time in cell
A5 a 1 will appear next to it in B5. If that same seven digit number
appears again by chance in cell A25 a 2 will appear next to it in cell B25.
Finally if that same seven digit number appears by chance in cell A39 then a
3 will appear next to it in cell B39.