If then formula

G

Guest

I want to write a formula to do the following:

If column w= 1 and column t-u <>0 and column t-u <= 50 and column t-u >+
-100 then return the word "immaterial" in column v else if column w=1 and
column t-u = 0 then return "pb" in column v else leave column v blank
 
G

Guest

=if(W1=1,if(T1-U1=0,"pb",if(and(T1-U1>-100,T1-U1<=50),"immaterial","")),"")
I assume what you meant by T-U>+-100 was just T-U>-100
 
G

Guest

Thanks, it works just like I want.
--
Libby


bj said:
=if(W1=1,if(T1-U1=0,"pb",if(and(T1-U1>-100,T1-U1<=50),"immaterial","")),"")
I assume what you meant by T-U>+-100 was just T-U>-100
 
G

Guest

I lied. The formula isn't working right when w<>1. It's returning " instead
of pb,immaterial or blank.
 
G

Guest

it's returning a single double quote?

are you sure your equation does not end in ...),"""") this would return a
single quote mark, but I am not sure what else would make it do that.
 
G

Guest

a quote double hyphon quote would also give a ''

Libby said:
I lied. The formula isn't working right when w<>1. It's returning " instead
of pb,immaterial or blank.
 
G

Guest

=if(W8=1,if(T8-U8=0,"pb",if(and(T8-U8>=-100,T8-U8<=50,"immaterial","")),V8)
this is the formula that I have and I am getting an error.

Any suggestions.
 
G

Guest

in this formula in W8<>1 it should give what is in V8
What is in V8 and what are you getting?
 
G

Guest

I am in column x and immaterial is in column v. I am getting an excel error
"the formula you typed contains an error.--
Libby
 
S

Sandy Mann

=if(W8=1,if(T8-U8=0,"pb",if(and(T8-U8>=-100,T8-U8<=50,"immaterial","")),V8)
You need a closing parenthesis after <=50 for the AND()

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
G

Guest

I think I got it. I was missing a )........thanks for your help.

Can you help with my control q question.
 

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

Similar Threads

Scrabble Value calculation for Welsh words 0
Columns not accessible 2
Summing 2 columns based on variables 3
IF formula 1
Help needed 0
Problem with SUMIF Formula 3
match with isna formula question 2
Excel VBA 1

Top