Text at the beginning of every cell

bonanza.bonanza
NewLounger
Posts: 6
Joined: 24 Jul 2021, 12:47

Text at the beginning of every cell

Post by bonanza.bonanza »

I want to add a text at the beginning of every cell. What should I do?

User avatar
HansV
Administrator
Posts: 72196
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Text at the beginning of every cell

Post by HansV »

Please provide more detailed information:
What do the cells contain? Text, or numbers, or dates?
Do they contain fixed values or formulas?
Regards,
Hans

bonanza.bonanza
NewLounger
Posts: 6
Joined: 24 Jul 2021, 12:47

Re: Text at the beginning of every cell

Post by bonanza.bonanza »

Here's an example of my report. How can I put a euro sigh before all of the numbers?
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 72196
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Text at the beginning of every cell

Post by HansV »

If this is for display purposes:
- Select the numbers.
- Set the number format to the custom format €0
This won't change the values, so you can still use them for calculations.

If you really want to add the € symbol to the values, they will become text values, so you won't be able to perform calculations with them anymore.
You could select the range, then run the following macro:

Code: Select all

Sub AddEuro()
    Dim rng As Range
    Application.ScreenUpdating = False
    For Each rng In Selection
        rng.Value = "'€" & rng.Value
    Next rng
    Application.ScreenUpdating = True
End Sub
Regards,
Hans