I have a spreadsheet sorted by name with a variety of amounts of entries by different name:
A B
name 1 £1
name 1 £3
name 1 £5
name 1 £2
name 2 £23
name 2 £21
I have a counter to total up the amounts by each name - and the method I want to use is:
Activate a1 then add b1 to counter
Activate a2
Here I need to check if the cell is different from the previous one so I can export the total to another sheet.
I want to use an If statement so if a2 IS different I can export the counter however if it is the same add the content of B2 to the counter and go onto the next one.
The code I have tried is:
------------------------------------------
The last line is the check I am using however, it doesn't matter what is in the previous cell it never goes back to loop1.
How can I get the condition to work?
There are a number of reasons why I want to do it this way, but it would take me too long to explain.
To clarify, I just need to compare A2 with A1 to see if it is the same. If it is it goes back to loop1 (as above) otherwise carries on the code after.
Thanks
Kev
Bookmarks