Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have been experimenting trying to find a way to use VBA to test to
see if a user has entered text into a cell. I have tried Len and istext without success - perhaps I am not doing it correctly, I am not sure. However through trial and error I found something that seems to work - I just want to be sure that it is not a fluke (no insult to the Fluke Mfg. company intended). I am trying in this example to determine if there is text in cell E14. I found that if I compare the value cell E14 to a positive integer (and then place a numerical value in cell G14 just as a test), it seems to work as follows; If Range("E14").Value < 1 Then Range("G14").Value = 7 I find that if cell E14 has text in it, then the formula runs and G7 remains blank. If there is text in E14, then the formula result is that G7 returns the value of 7. I have tried this with several entries, and it seems to work. The cell E14 is set to 'General' by the way. I do not understand why it works. Is this going to work all of the time, or is it just a fluke? I would appreciate knowing if I am creating a problem for myself in the future if I use this test in a VBA program. Can someone tell me if what I am doing is going to be reliable and work in the future? Thanks in advance, again... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User form - Testing for numbers or text | Excel Discussion (Misc queries) | |||
Opening and Testing Large Text File | Excel Programming | |||
Testing text on a shape | Excel Programming | |||
Testing for text | Excel Programming | |||
Testing for text | Excel Programming |