View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Charabeuh[_2_] Charabeuh[_2_] is offline
external usenet poster
 
Posts: 9
Default Compare value in cell A to value in Cell b and add 1

another way

[B4] = IIf([B4] = [C3], 1, [B4] + 1)


"Kerry" a écrit dans le message de
...
Hi,
When I run a VBA program in excel 2003 I want to compare the value in cell
B4 to the value in C3. If B4 < C3 then add 1 to B4 if not continue until
B4=C3 then reset to 1.
If B4<C3+1 else "1"
How do I write this in VBA?

Thankyou
--
Kerry