adding text to cells

alvo23

New Member
Joined
Apr 28, 2003
Messages
44
I want to add the same word to many of my cells (which contain text)...
I want to add the word "total" to the beginning of everything in column A.

Is there any quick way to do this?

Thanks!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Here is a simple little macro that will do that:

Code:
Sub AddTotal()

    Application.ScreenUpdating = False
    
    Dim cell As Range
    
    For Each cell In Range("A1:A" & Range("A65536").End(xlUp).Row)
        If Len(cell) > 0 Then cell.Value = "Total " & cell.Value
    Next cell
    
    Application.ScreenUpdating = True
    
End Sub
 
Upvote 0
From the Tools drop down menu, you can record a new macro. Record a macro called "AddTotal", then push the stop button immediately. Then go back to Tools | Macro | Macros, highlight the "AddTotal" macro and click edit. Then paste the body of the code above in between the two lines of the macro. Then simply run the macro!
 
Upvote 0

Forum statistics

Threads
1,221,701
Messages
6,161,381
Members
451,700
Latest member
Eccymarge

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top