Search for, and extract data

MIKEBIZ

New Member
Joined
Apr 25, 2015
Messages
11
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[TD="align: center"]H[/TD]
[TD="align: center"]I[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]TODAY'S DATE:[/TD]
[TD="align: center"] WITH/WITHOUT PAY:[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]DATE EMPLOYEE LEAVING[/TD]
[TD="align: center"]DATE EMPLOYEE RETURNING[/TD]
[TD="align: center"]WITH OR WITHOUT PAY[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]11-9-2015[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]10-30-2015[/TD]
[TD="align: center"]11-2-2015[/TD]
[TD="align: center"]WITH[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]11-7-2015[/TD]
[TD="align: center"]11-14-2015[/TD]
[TD="align: center"]WITHOUT[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]12-25-2015[/TD]
[TD="align: center"]12-26-2015[/TD]
[TD="align: center"]BIRTHDAY PAY[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]
















HELLO, WHAT I'M TRYING TO DO IS WRITE A FORMULA IN CELL B2 THAT WILL CHECK IF TODAY'S DATE (A2) IS >= DATE EMPLOYEE LEAVING (COLUMN G) AND AT THE SAME TIME
A2 < DATE EMPLOYEE RETURNING (COLUMN H). IF BOTH CONDITIONS ARE TRUE, I WOULD LIKE IT TO RETURN THE VALUE FROM COLUMN I. IF ONE OF THE CONDITIONS IS NOT TRUE,THEN "". THANK YOU IN ADVANCE FOR YOUR HELP, THIS PROBLEM IS DRIVING ME CRAZY:banghead::banghead::banghead:
 
Last edited:

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Copy B2 down.
Excel Workbook
ABCDEFGHI
1TODAY'SDATE:WITH/WITHOUT PAY:DATE EMPLOYEE LEAVINGDATE EMPLOYEE RETURNINGWITH OR WITHOUT PAY
211/9/2015 10/30/201511/2/2015WITH
311/9/2015WITHOUT11/7/201511/14/2015WITHOUT
411/9/201512/25/201512/26/2015BIRTHDAY PAY
Sheet1
 
Upvote 0
thanks for the suggestion, but that's not what I'm looking for exactly. The data in G,H,and I is dynamic and could be 1000 rows long. I need B2 to change as the date in A2 changes...
 
Upvote 0
thanks for the suggestion, but that's not what I'm looking for exactly. The data in G,H,and I is dynamic and could be 1000 rows long. I need B2 to change as the date in A2 changes...
Well you could copy the formula down to the last row of data. B2 will change if you set the date in A2 to be inside your target range (10/30/2015 - 11/2/2015). If that's not what you want, maybe you could elaborate a bit.
 
Upvote 0
Again thanks for your help... I guess i'm not explaining my problem well enough. i would like the formula to search both columns G and H, find the row where A2 => G and A2 < H, then return the value from I in that row.

I guess I need an INDEX MATCH formula that considers those two conditions.
 
Upvote 0
Again thanks for your help... I guess i'm not explaining my problem well enough. i would like the formula to search both columns G and H, find the row where A2 => G and A2 < H, then return the value from I in that row.

I guess I need an INDEX MATCH formula that considers those two conditions.

So the only input date is the lone value in A2 and the match is to be returned to B2 ...... or ????
 
Upvote 0
yes, exactly!!!

This sheet is part of a bigger workbook, The date in A2 will change and I need the match to be returned to B2
 
Last edited:
Upvote 0
So, the formula in B2 should check if the date in A2 falls in between G and H. Then if so, return I
 
Upvote 0
So, the formula in B2 should check if the date in A2 falls in between G and H. Then if so, return I

Does this do it?
Excel Workbook
ABCDEFGHI
1TODAY'SDATE:WITH/WITHOUT PAY:DATE EMPLOYEE LEAVINGDATE EMPLOYEE RETURNINGWITH OR WITHOUT PAY
211/9/2015WITHOUT10/30/201511/2/2015WITH
311/7/201511/14/2015WITHOUT
412/25/201512/26/2015BIRTHDAY PAY
Sheet1
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top