Share via

Change format to text

Anonymous
2011-12-07T12:22:57+00:00

Is there VBA that will turn the data in a spreadsheet or columns in a spreadsheet into a number stored as text so that the upper left hand corner of the cell will display the green triangle in the corner and the exclamation point within the yellow box when the cell is clicked on?

Right now I have this  

    Cells.Select

    Selection.NumberFormat = "@"

And this

    Columns("G:G").Select

    Selection.NumberFormat = "@"

But neither changes the format to text so that the upper left hand corner of the cell will display the green triangle in the corner and the exclamation point within the yellow box when the cell is clicked on. Can you help me do that?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2011-12-07T12:57:02+00:00

The same happens when you manually (in the interface) set the number format of a range filled with numbers to Text: no green triangles. You can see the numbers, so if you format the cells as text, it presumably is intentional.

You get a green triangle in the reverse situation: you enter a number into a cell that has already been formatted as Text. You may not have been aware of the text format, and if the cells are right-aligned, it is not immediately apparent that you're not entering real numbers, so Excel displays the warning triangle.

Why do you want the green triangle to be displayed?

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful