Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, all:
I have the folloiwng code. If cell A1 is a numberical number 0, then a value 1 will be returned in cell B1. However, if I enter a text string into cell A1, it will still return a number 1 in cell B1. How to list them as two different cases, i.e. return a different value in cell B1 if cell A1 is text string? I appreciate your help! Thank you so much! Sub ReturnDifferentNumber() Range("B1") = 0 If Range("A1").Value 0 Then Range("B1").Value = 1 End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sort in numberical order | Excel Discussion (Misc queries) | |||
Dealing with minus numbers in formulas | Excel Discussion (Misc queries) | |||
Dealing with range of numbers in a cell | Excel Worksheet Functions | |||
Dealing with numbers that begin with a 0 | Excel Worksheet Functions | |||
dealing with very long numbers | Excel Discussion (Misc queries) |