# IF function with three variables

1. ## IF function with three variables

Hi,

I'm having trouble with my logic again :/

 AREA Tp std Tp 30 5

So I want the Tp in the 3rd column to show the result:

IF AREA is less than or equal to 20, Tp=Tp std / 2

IF AREA is between 20 and 40, Tp=(((AREA-20)/(40-20))*(Tp std/2))+(Tp std/2)

IF AREA is 40 or greater Tp = Tp std

But as one equation

I hope this makes sense and somebody can help me, I have just been struggling with the range part.

Thanks

2. ## Re: IF function with three variables

Assuming Area is column A, Tp std is column B, then put this in C2:

=IF(A2<=20,B2/2,IF(A2>=40,B2,((A2-20)/(40-20))*B2/2+B2/2))

Hope this helps.

Pete

3. ## Re: IF function with three variables

Thank you very much, it seems simple now. I was going about it the wrong way

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1