Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro for replacing data
Hi
If I want to replace 0 with a name above zero, is there a way to do it? I have about 350 names to replace, where the zero is under the name row. I got the zero when tried to get a sub total of hours and amount columns (not shown). thank you and Happy New Year. 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 Total 0 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 Total 0 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 Total 0 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro for replacing data
|
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro for replacing data
Hi There Da,
Many different ways you can achieve this without macros. I would try inserting a formula in column C starting in Row 2 that says: =IF(B2=0,+B1,B2) Copy it down to the bottom of you data and make sure you are geting the desired result. then Copy Paste Special Values it over Column B and delete the formula from Column C. You could alternately use a formula that says: =IF(RIGHT(A2,2)="al",+B1,+B2) and do the same with it as the previous suggestion. HTH and Good Luck, Matt "da" wrote: Hi If I want to replace 0 with a name above zero, is there a way to do it? I have about 350 names to replace, where the zero is under the name row. I got the zero when tried to get a sub total of hours and amount columns (not shown). thank you and Happy New Year. 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 Total 0 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 Total 0 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 Total 0 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro for replacing data
Thanks for your help. The formula works; I copied it for few names and it
worked. However, I have over 35,000 records and I have to insert the formula at each sub-total row for each name. There are over 400 names in the spreadsheet, which makes it very cumbersome to use the formula. I may have to copy the last name for each name. Anyway, thanks for your help. "veryeavy" wrote: Hi There Da, Many different ways you can achieve this without macros. I would try inserting a formula in column C starting in Row 2 that says: =IF(B2=0,+B1,B2) Copy it down to the bottom of you data and make sure you are geting the desired result. then Copy Paste Special Values it over Column B and delete the formula from Column C. You could alternately use a formula that says: =IF(RIGHT(A2,2)="al",+B1,+B2) and do the same with it as the previous suggestion. HTH and Good Luck, Matt "da" wrote: Hi If I want to replace 0 with a name above zero, is there a way to do it? I have about 350 names to replace, where the zero is under the name row. I got the zero when tried to get a sub total of hours and amount columns (not shown). thank you and Happy New Year. 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 SANTIAGO 8 Total 0 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 LECOURS 14 Total 0 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 BRUNO 25 Total 0 |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro for replacing data
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Help replacing dropped zeros | Excel Discussion (Misc queries) | |||
Macro replacing links | Excel Discussion (Misc queries) | |||
replacing macro? | Excel Discussion (Misc queries) | |||
Macro help:replacing figures | Excel Discussion (Misc queries) | |||
In a Macro replacing $x with ($x + i) gives x+1 not $x+1 as expe. | New Users to Excel |