telling VB: if cells(a,b)="any number" then ...

G

Guest

Hi, this is easy for you, how to tell VB that if cells(a,b) is equal to any
number then bla bla bla.

Also I would like to know:
equal to string
equal to fractional numbers (3.453)

TIA
 
B

Bob Umlas

if cells(3,4).value = "XYZ" then ...
or
if cells(5,1).value = 3.453 then ...

Not sure what the problem is/was...?
 
T

Tushar Mehta

Check the various XL Isxxxx functions (search XL help for 'is
functions' -- w/o the quotes) and how VBA can use XL functions (search
XL VBA help for 'excel functions' -- again, without the quotes).

To test if a number is an integer or a real number, use either the \
operator or the mod operator.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top