Need to test for alphanumeric value and write numeric values to ce

G

Guest

The cell B2 has a data validation list of W2, 1099, or B2B and I want to
write two different values to B14 & B15 if users select the value W2, and if
anything else is selected, then write zeros to the same two cells. I've
tried the following:

=IF(B2="w2"), (B14=1.1235,B15=6.35),(B14=0,B15=0)

The error message I get highlights "w2" as an error when I try to enter
this.
 
P

Peo Sjoblom

You need 2 different formulas, a formula can only return a value in the cell
that holds the formula, so in B14 put

=IF(B2="w2",1,0)

can be simplified to

=--(B2="w2")

or

=N(B2="w2"


in B15 put

=IF(B2="w2",6.35,0)
 
G

Guest

Peo,

Thanks so very much. It works perfectly.
--
Pyramid 36 "Ken"



Peo Sjoblom said:
You need 2 different formulas, a formula can only return a value in the cell
that holds the formula, so in B14 put

=IF(B2="w2",1,0)

can be simplified to

=--(B2="w2")

or

=N(B2="w2"


in B15 put

=IF(B2="w2",6.35,0)
 

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