MrExcel Publishing
Your One Stop for Excel Tips & Solutions

How do you change a value using a macro


Posted by Mike on July 18, 2000 5:19 AM

i have data in a pivot table that i dont want to be added. i was thinking if i put a "*" next to the number it wouldnt add it and think it was text. how can i put that in a macro so it when it finds "mike" for ex. it changes the number next to it to 23*.
My data example:
mike 23
john 22
jake 25


Posted by Ada on July 18, 0100 7:00 PM


Mike
Here's a suggested alternative approach (without using a macro):-

Add a column and enter in this column a "*" in the rows that you don't want added.

Use a SUMIF formula to arrive at the total.
For example, if the numbers to be added are in range D1:D10 and the "*" in column A, the formula would be :-
=SUMIF(A1:A10,"<>*",D1:D10)

Ada