A ANKUSHRS1 Member May 5, 2018 #1 pls refer attachment and help. Attachments SOL REQD.xlsx 8.7 KB · Views: 4
N NARAYANK991 Excel Ninja May 5, 2018 #2 Hi , A simple formula will do the job ; why do you want VBA ? =IF(OR(B2 <> B1, A2 <> A1), MAX(C$1:C1) + 1, C1) Enter this in cell C2 and copy it down. Narayan
Hi , A simple formula will do the job ; why do you want VBA ? =IF(OR(B2 <> B1, A2 <> A1), MAX(C$1:C1) + 1, C1) Enter this in cell C2 and copy it down. Narayan
A ANKUSHRS1 Member May 5, 2018 #3 thanks for your reply...but I want it in vba to add my macro to automate the program.
Marc L Excel Ninja May 5, 2018 #4 A demonstraton as a very beginner starter : Code: Sub Demo4Noob() [C2].Value = 1 With Range("C3", [A1].End(xlDown)(1, 3)) .Formula = "=C2+(B3<>B2)" .Formula = .Value End With End Sub Do you like it ? So thanks to click on bottom right Like !
A demonstraton as a very beginner starter : Code: Sub Demo4Noob() [C2].Value = 1 With Range("C3", [A1].End(xlDown)(1, 3)) .Formula = "=C2+(B3<>B2)" .Formula = .Value End With End Sub Do you like it ? So thanks to click on bottom right Like !