I have had a problem with some data not appearing to be what I thought it was. A column that appeared to be all numbers contained some text fields.
I'd been looking for a solution and with the help of members (of another forum) I think I now have a solution.
If I have a character 1 in a cell - then that cell is 1 character long and has the ASCII code 49 but when I apply isnumeric then I may get TRUE for some cells and FALSE for other cells.
Not having control of the data source I wanted to be able to validate the data - prior to use.
So simple but just select the range then multiply the source by 1 and replace
Private Sub CommandButton2_Click()
Set myRng = Sheets(ActiveSheet.Name).Range("A29:C34")
For Each rngCell In myRng
rngCell.Value = rngCell.Value * 1
Next rngCell
End Sub
Hi peterhw and welcome to the forum.
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
Please leave a message after the beep!
New thread started, and apparently resolved, here: http://www.excelforum.com/excel-prog...d-as-text.html
This thread is closed.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks