Solved

Excel formula

Posted on 2014-03-26
4
166 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
Comment Utility
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
Comment Utility
=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 48

Accepted Solution

by:
Rgonzo1971 earned 167 total points
Comment Utility
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
Comment Utility
All 3 solutions worked idenicaly and i thank you for all the effort.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

762 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

6 Experts available now in Live!

Get 1:1 Help Now