Solved

Excel formula

Posted on 2014-03-26
4
170 Views
Last Modified: 2014-03-26
I have a worksheet I am tring to add a column to in G and what I want is as follows.

If C2 is greater than E2 and less than F2 I want G2 to be 1 but if C2 is Less than E2 or Greater than F2 by on 2-5 then G2 will be 2 but if C2 is Less than E2 or greater than F2 by 5 or more the make G2 a value of 3.

is this possible?
0
Comment
Question by:jlcannon
4 Comments
 
LVL 43

Assisted Solution

by:Saqib Husain, Syed
Saqib Husain, Syed earned 167 total points
ID: 39956689
Try

=if(and(c2>E2,c2<f2),1,if(min(e2-c2,c2-f2)>5,3,2)
0
 
LVL 8

Assisted Solution

by:itjockey
itjockey earned 166 total points
ID: 39956696
=IF(AND(C2>E2,C2<F2),1,IF(OR(C2<E2,(C2-F2)>2,(C2-F2)<5),2,IF(OR(C2<E2,(C2-F2)>5),3)))
0
 
LVL 49

Accepted Solution

by:
Rgonzo1971 earned 167 total points
ID: 39956702
Hi,

pls try
=IF(AND(C2>E2,C2<F2),1,IF(OR(C2<E2,AND(C2>F2+2,C2<=F2+5)),2,IF(OR(C2<E2,AND(C2>F2+5)),3,"")))

Open in new window

Regards
0
 

Author Closing Comment

by:jlcannon
ID: 39956828
All 3 solutions worked idenicaly and i thank you for all the effort.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now