Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to record keystrokes and not cell addresses Brian William Johnston Excel Discussion (Misc queries) 3 May 17th 06 09:27 PM
Special keystrokes in a Macro Eric Excel Discussion (Misc queries) 4 May 18th 05 02:26 PM
How do I create a macro of editing keystrokes? scjanner Excel Discussion (Misc queries) 0 January 21st 05 11:07 PM
Make a macro of keystrokes. ie. F2,Shift & Home & right cursor,de. Ted Byrd Excel Worksheet Functions 1 December 29th 04 05:52 PM
Relative Macro Help on Keystrokes Neal Zimm Excel Discussion (Misc queries) 9 December 15th 04 12:31 AM


All times are GMT +1. The time now is 03:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"