![]() |
VB Function Needed - Differentiate between a number and a characte
Hello,
Trying to setup a simple code to rearrange some data. The data looks like: blah blah 123 33 222 123 44 22 blah blah What I'm doing is moving all of the data into one line. The data is always in groups of threes with text strings thrown into random rows in between the groups of three. I have a VB script set to reorganize the data, however I can't find a function or appropriate method to tell whether the cell that is currently selected contains a number or character string. Can you offer any help or ideas? Thank you! Iffy |
VB Function Needed - Differentiate between a number and a characte
Sub gsnu()
If Application.IsNumber(Selection.Value) Then MsgBox ("number") Else MsgBox ("not number") End If End Sub If you are testing a cell in the worksheet. -- Gary''s Student "Iffy Functionality" wrote: Hello, Trying to setup a simple code to rearrange some data. The data looks like: blah blah 123 33 222 123 44 22 blah blah What I'm doing is moving all of the data into one line. The data is always in groups of threes with text strings thrown into random rows in between the groups of three. I have a VB script set to reorganize the data, however I can't find a function or appropriate method to tell whether the cell that is currently selected contains a number or character string. Can you offer any help or ideas? Thank you! Iffy |
VB Function Needed - Differentiate between a number and a char
That's perfect - thank you!
"Gary''s Student" wrote: Sub gsnu() If Application.IsNumber(Selection.Value) Then MsgBox ("number") Else MsgBox ("not number") End If End Sub If you are testing a cell in the worksheet. -- Gary''s Student "Iffy Functionality" wrote: Hello, Trying to setup a simple code to rearrange some data. The data looks like: blah blah 123 33 222 123 44 22 blah blah What I'm doing is moving all of the data into one line. The data is always in groups of threes with text strings thrown into random rows in between the groups of three. I have a VB script set to reorganize the data, however I can't find a function or appropriate method to tell whether the cell that is currently selected contains a number or character string. Can you offer any help or ideas? Thank you! Iffy |
All times are GMT +1. The time now is 07:20 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com