Microsoft Excel for PC Logo
Anonymous Posted on Jun 11, 2009

Need formula for excel

I am trying to compare a date with a date range, if my date in Sheet3!A2 is equal to or greater than Sheet3!F3 and less than or equal to Sheet3!g3 give me a value of x.

2 Answers

Anonymous

Level 2:

An expert who has achieved level 2 by getting 100 points

MVP:

An expert that got 5 achievements.

Governor:

An expert whose answer got voted for 20 times.

Scholar:

An expert who has written 20 answers of more than 400 characters.

  • Expert 68 Answers
  • Posted on Jun 19, 2009
Anonymous
Expert
Level 2:

An expert who has achieved level 2 by getting 100 points

MVP:

An expert that got 5 achievements.

Governor:

An expert whose answer got voted for 20 times.

Scholar:

An expert who has written 20 answers of more than 400 characters.

Joined: Dec 14, 2008
Answers
68
Questions
6
Helped
18966
Points
187

A simple, but not elegant way of doing this is use the following formula in the cell in which you want your 'x' to appear. This does a little more than you've asked for, but you can modify if you don't care about the other values.

=if(a2>=f3,if(a2<g3,h3,j3),i3)

In addition to the problem you've provided, I've assumed that column H (same row) contains the value you want if the a2 is within the range, column I contains a value for before the date range and column j contains the value for after the range. I included the latter two because the fields are included in the formula. If you don't want them, you can replace j3 and i3 in the formula with 0 or any other value you want when out of range. If you leave them out of the formula, it will return the logical value FALSE when out of range - you may not want that.

angel dust

Level 2:

An expert who has achieved level 2 by getting 100 points

MVP:

An expert that got 5 achievements.

Sergeant:

An expert that has over 500 points.

Champion:

An expert who has answered 200 questions.

  • Expert 240 Answers
  • Posted on Jun 11, 2009
angel dust
Expert
Level 2:

An expert who has achieved level 2 by getting 100 points

MVP:

An expert that got 5 achievements.

Sergeant:

An expert that has over 500 points.

Champion:

An expert who has answered 200 questions.

Joined: Jun 10, 2009
Answers
240
Questions
0
Helped
65464
Points
676

Well the symbol for greater than would be => and for lesser than would be +<  so if you can incorporate that into your formula it should work. Something like A2=>Sheet3.

Ad

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

0helpful
1answer

Need formula for Excel

Try using "count if blank"
I am assuming that you need the value to be on sheet 3
If you want the value to be on another sheet, it is more complicated, you will have to "paste special" the value to a different sheet.
0helpful
1answer

Excel formulas

Below is the formula for "2". The logic should be obvious from this so you can adapt for "1" or a combination of 1 and 2. This need to be written as one long formula so I have pasted it in to this reply so you can do a copy and paste into your spreadsheet. Sorry its not very readable in this form but you could paste into word so you can break it down and examine structure.

=IF(OR((AND(Sheet3!A12="WA",OR(Sheet3!AH2="Lewis",Sheet3!AH2="Pacific",Sheet3!AH2="Wahkiakum"))),(AND(Sheet3!A12="OR",OR(Sheet3!AH2="Clackmas",Sheet3!AH2="Multnomah",Sheet3!AH2="Washington")))),"X"," ")
0helpful
1answer

Need an excel formula.

The crude solution is:
=IF(Sheet3!I2="WA",IF(Sheet3!H2="Vancouver","X",IF(Sheet3!H2="Camas","X",IF(Sheet3!H2="Ridgefield","X",IF(Sheet3!H2="Washougal","X",IF(Sheet3!H2="Stevenson","X",IF(Sheet3!H2="Hockinson","X","?City?")))))),"?State?")

Where ?City? appears when the city referenced in H2 is not part of the lookup
and ?State? appears when something other than WA appears in I2.

But there is probably a better way to do this using an array of valid values like the one below:

AL NY TX WA Birmingham Albany Abilene Camas Huntsville Buffalo Galvaston Hockinson Russell New York Houston Ridgefield Stevenson Vancouver Washougal

In the scenario you could stuff the array in another worksheet and use the HLookup function to find the "Sheet3!I2" value in the first row of this array to determine which column to look in, then VLookup "Sheet3!H2" in the column of that array to see if the city referenced exists. Of course this is a much more complex formula, but it would be easily extendible without changing the formula every time.

For mor info, see "Lookup and Reference Functions" in the Excel Help.
0helpful
1answer

Excel Formula

With data in A1 to C1: A2 =IF(A1>0,1,0) B2 =IF(B1>0,1,0) C2 =IF(C1>0,1,0) A3 =SUM(A2:C2)
1helpful
2answers

Formula not working correctly

You need to change the =IF(AND to =IF(OR
Using AND is saying both conditions must be true. Using OR is saying either condition 1 or 2 need to be true
0helpful
1answer

Excel formula related to a date range

Use the IF and Date functions together. On sheet 3, put the birthday (3/15/1954) in cell B1, put the beginning date (1/1/1946) in cell C1 and the ending date (12/31/1964) in cell D1.
Then on Sheet 1, but the following formula in the cell you want an X to be placed in.
=IF(AND(Sheet3!B1>=Sheet3!C1,(Sheet3!B1<=Sheet3!D1)),"X"," ").
Make sure you type the formula Exactly as it appears.
0helpful
1answer

IF Formula

You can use this formula
=IF(A2<=100,"Within budget","Over budget")
Which means
If the number above is less than or equal to 100, then the formula displays "Within budget". Otherwise, the function displays "Over budget" (Within budget)
or you and try something like this
=IF(A2=100,SUM(B5:B15),"")
which means
If the number above is 100, then the range B5:B15 is calculated. Otherwise, empty text ("") is returned ()
I got these examples from the help within Exel they give several more examples and more expaination.
1helpful
3answers

Excel formula help

formula for the keys or short curt for excel
0helpful
1answer

Copying data from one sheet to another if two fileds match

Nope, sorry, although I am truly an expert at Excel formulas, I do not understand what you are trying to end up with in the final cell. We can compare a specified field with two spreadsheets - use named ranges and index/match lookup formulas. But then where you really lose me is in reading "a generic field" to find a match, and then placing what "data from another field" into what "other sheet" - ? See the confusion?

Best way to compare 2 given parameters would be to use a nested if formula, with index/match combo. Here is a simple Excel example of how such a formula could be structured:

Sample Data (columnar arangement):
A1: Part B1: Code C1: Price D1: Find Part E1: Find Code
A2: x B2: 11 C2: 5.00 D2: y E2: 12
A3: x B3: 12 C3: 6.00 D3: y E3: 11
A4: y B4: 11 C4: 7.00 D4: x E4: 12
A5: y B5: 12 C5: 8.00 D5: x E5: 11

To retrieve the price for part y with code 12 and return the value to cell F2, type the following formula in cell F2:
=INDEX($C$2:$C$5,MATCH(D2,IF($B$2:$B$5=E2,$A$2:$A$5),0))

Press CTRL+SHIFT+ENTER to enter the formula as an array formula. The formula returns the value 8.00.

To take this one step further, with range names, this example will find one value at a specified location which matches a specific row header value and column header value. Let's say the range is home values (Range=HomeVal), Column A of HomeVal contains street addresses,"row headers" (Range=StAddress), and Row 1 contains dates of the various values that are in the body of the table, "column headers" (Range=Dates). To return the specific value from the range HomeVal to another sheet, where A1=address specified and A2=date specified:
=INDEX(HomeVal,(MATCH($A$1,StAddress,0)),(MATCH($A$2,Dates,0)))

Then make sure to press CTRL+SHIFT+ENTER to enter the formula as an array formula - if you only hit enter, these types of formulas will not work properly.

Please post back if you need further help, with more details, otherwise thank you for using and rating FixYa!
0helpful
2answers

Excel 2002 formula

Try this:

=IF((E2<38),B2*14.3, IF((E2<44),B2*15.05, IF((E2<50),B2*15.8,0)))

Note that <38 is the same as <=37. Also, you can replace the 0 at the end with empty quotes "" for a blank cell.
Not finding what you are looking for?

122 views

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

Grand Canyon Tech
Grand Canyon Tech

Level 3 Expert

3867 Answers

k24674

Level 3 Expert

8093 Answers

Brad Brown

Level 3 Expert

19187 Answers

Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...