Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Recording a Macro that follows Keystrokes
Hello,
I have a column of descriptions which all end in "Total" - (I did a subtotal and copied the results into another worksheet.). I tried recording a Macro to delete the "Total", but for every cell below the first it just copied what I had done in the first cell. Is there a way I can get rid of the "Total" at the end, without having to manually go through all 26,000 lines? Thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Recording a Macro that follows Keystrokes
Select the cells and run:
Sub nototal() For Each r In Selection r.Value = Replace(r.Value, "Total", "") Next End Sub -- Gary''s Student - gsnu200743 "freakyquo" wrote: Hello, I have a column of descriptions which all end in "Total" - (I did a subtotal and copied the results into another worksheet.). I tried recording a Macro to delete the "Total", but for every cell below the first it just copied what I had done in the first cell. Is there a way I can get rid of the "Total" at the end, without having to manually go through all 26,000 lines? Thanks |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Recording a Macro that follows Keystrokes
How about selecting the range
Edit|replace what: Total with: (leave blank) replace all But you may have _Total (spacebar total). You may want to get rid of " total", not just "total". If you need a macro, record one when you select the column and do the edit|Replace. freakyquo wrote: Hello, I have a column of descriptions which all end in "Total" - (I did a subtotal and copied the results into another worksheet.). I tried recording a Macro to delete the "Total", but for every cell below the first it just copied what I had done in the first cell. Is there a way I can get rid of the "Total" at the end, without having to manually go through all 26,000 lines? Thanks -- Dave Peterson |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Recording a Macro that follows Keystrokes
Thanks, that worked a treat
"Gary''s Student" wrote: Select the cells and run: Sub nototal() For Each r In Selection r.Value = Replace(r.Value, "Total", "") Next End Sub -- Gary''s Student - gsnu200743 "freakyquo" wrote: Hello, I have a column of descriptions which all end in "Total" - (I did a subtotal and copied the results into another worksheet.). I tried recording a Macro to delete the "Total", but for every cell below the first it just copied what I had done in the first cell. Is there a way I can get rid of the "Total" at the end, without having to manually go through all 26,000 lines? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to record keystrokes and not cell addresses | Excel Discussion (Misc queries) | |||
Special keystrokes in a Macro | Excel Discussion (Misc queries) | |||
How do I create a macro of editing keystrokes? | Excel Discussion (Misc queries) | |||
Make a macro of keystrokes. ie. F2,Shift & Home & right cursor,de. | Excel Worksheet Functions | |||
Relative Macro Help on Keystrokes | Excel Discussion (Misc queries) |