Thread: Counting Macro
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
MCheru MCheru is offline
external usenet poster
 
Posts: 70
Default Counting Macro

Wow, you were right. It works; I didn't think it was possible without a
macro. If possible, could you explain this formula to me?

"Rick Rothstein" wrote:

If I understand you correctly, you don't need a macro to do that. Put this
formula in B2 and copy it down as far as you like...

=IF(A2="","",COUNTIF(A$2:A2,A2))

--
Rick (MVP - Excel)


"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.