Text at the beginning of every cell
-
- NewLounger
- Posts: 6
- Joined: 24 Jul 2021, 12:47
Text at the beginning of every cell
I want to add a text at the beginning of every cell. What should I do?
-
- Administrator
- Posts: 78236
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Text at the beginning of every cell
Please provide more detailed information:
What do the cells contain? Text, or numbers, or dates?
Do they contain fixed values or formulas?
What do the cells contain? Text, or numbers, or dates?
Do they contain fixed values or formulas?
Best wishes,
Hans
Hans
-
- NewLounger
- Posts: 6
- Joined: 24 Jul 2021, 12:47
Re: Text at the beginning of every cell
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.
-
- Administrator
- Posts: 78236
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Text at the beginning of every cell
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:
- 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
Best wishes,
Hans
Hans