Vlookup, code help

Harrywatson

Board Regular
Joined
Jan 20, 2014
Messages
92
I explained this question badly intitially. I have now added my data in table form.

[HTMLExcel 2012
ABCDEFGHIJKLMN
1298217014/05/2014UK12443760071508042013MSTX 01UK12443760071508-04-2013MSTX£72017 months, 3 days08/08/2014BUSKIPTON
1299217114/05/2014UK12459330121312072013MLIMX 01UK12459330121312-07-2013MLIMX£88513 months, 30 days12/11/2014BUSKIPTON
1300217214/05/2014UK12486430057217052013MLIMX 01UK12486430057217-05-2013MLIMX£90015 months, 25 days17/09/2014BUSKIPTON
1301217314/05/2014UK12486430059318072013MLIMX 01UK12486430059318-07-2013MLIMX£92513 months, 24 days18/11/2014BUSKIPTON
1302217414/05/2014UK12495660038813062013MBAX 01UK12495660038813-06-2013MBAX£89014 months, 29 days13/10/2014BUSKIPTON
1303217514/05/2014UK12510170077719052013MCHX 01UK12510170077719-05-2013MCHX£84015 months, 23 days19/09/2014BUSKIPTON

<tbody>
</tbody>
ON 13-14

Worksheet Formulas
CellFormula
A1298=A1297+1
B1298=B1297
A1299=A1298+1
B1299=B1298
A1300=A1299+1
B1300=B1299
A1301=A1300+1
B1301=B1300
A1302=A1301+1
B1302=B1301
A1303=A1302+1
B1303=B1302
D1298=LEFT(C1298,8)
E1298=MID(C1298,9,6)
F1298=TEXT(MID(C1298,15,8),"00-00-0000")
G1298=MID(C1298,23,1)
H1298=MID(C1298,24,LEN(C1298)-26)
D1299=LEFT(C1299,8)
E1299=MID(C1299,9,6)
F1299=TEXT(MID(C1299,15,8),"00-00-0000")
G1299=MID(C1299,23,1)
H1299=MID(C1299,24,LEN(C1299)-26)
D1300=LEFT(C1300,8)
E1300=MID(C1300,9,6)
F1300=TEXT(MID(C1300,15,8),"00-00-0000")
G1300=MID(C1300,23,1)
H1300=MID(C1300,24,LEN(C1300)-26)
D1301=LEFT(C1301,8)
E1301=MID(C1301,9,6)
F1301=TEXT(MID(C1301,15,8),"00-00-0000")
G1301=MID(C1301,23,1)
H1301=MID(C1301,24,LEN(C1301)-26)
D1302=LEFT(C1302,8)
E1302=MID(C1302,9,6)
F1302=TEXT(MID(C1302,15,8),"00-00-0000")
G1302=MID(C1302,23,1)
H1302=MID(C1302,24,LEN(C1302)-26)
D1303=LEFT(C1303,8)
E1303=MID(C1303,9,6)
F1303=TEXT(MID(C1303,15,8),"00-00-0000")
G1303=MID(C1303,23,1)
H1303=MID(C1303,24,LEN(C1303)-26)
J1298=DATEDIF(F1298,NOW(),"m") &" months, " & DATEDIF(F1298,NOW(),"md") &" days "
K1298=IF(IFERROR(VLOOKUP(A1298,'OFF 13-14'!A:A,1,0),0)='ON 13-14'!A1298,"✓","")
L1298=EDATE(F1298,16)
J1299=DATEDIF(F1299,NOW(),"m") &" months, " & DATEDIF(F1299,NOW(),"md") &" days "
K1299=IF(IFERROR(VLOOKUP(A1299,'OFF 13-14'!A:A,1,0),0)='ON 13-14'!A1299,"✓","")
L1299=EDATE(F1299,16)
J1300=DATEDIF(F1300,NOW(),"m") &" months, " & DATEDIF(F1300,NOW(),"md") &" days "
K1300=IF(IFERROR(VLOOKUP(A1300,'OFF 13-14'!A:A,1,0),0)='ON 13-14'!A1300,"✓","")
L1300=EDATE(F1300,16)
J1301=DATEDIF(F1301,NOW(),"m") &" months, " & DATEDIF(F1301,NOW(),"md") &" days "
K1301=IF(IFERROR(VLOOKUP(A1301,'OFF 13-14'!A:A,1,0),0)='ON 13-14'!A1301,"✓","")
L1301=EDATE(F1301,16)
J1302=DATEDIF(F1302,NOW(),"m") &" months, " & DATEDIF(F1302,NOW(),"md") &" days "
K1302=IF(IFERROR(VLOOKUP(A1302,'OFF 13-14'!A:A,1,0),0)='ON 13-14'!A1302,"✓","")
L1302=EDATE(F1302,16)
J1303=DATEDIF(F1303,NOW(),"m") &" months, " & DATEDIF(F1303,NOW(),"md") &" days "
K1303=IF(IFERROR(VLOOKUP(A1303,'OFF 13-14'!A:A,1,0),0)='ON 13-14'!A1303,"✓","")
L1303=EDATE(F1303,16)

<tbody>
</tbody>

<tbody>
</tbody>

][/HTML]

This is on the first sheet which is called "ON 13-14" this information is similiar all the way down this sheet for about 1500 rows.

My second sheet is blank.

What I would like on my second sheet is any rows of data on the first sheet (ON 13-14), where the date in column L is between two dates of my own choice.
Lets say i would like all rows (A-N) that have a date that is between 11/11/14 and 19/11/14 in column L to appear in the blank sheet.

So from the example i have given the rows that would then appear under the specification that i have given (The date in Column L is between 11/11/14 and 19/11/14) are as follows

HTML:
Excel 2012ABCDEFGHIJKLMN1299217114/05/2014UK12459330121312072013MLIMX 01UK12459330121312-07-2013MLIMX£88513 months, 30 days 12/11/2014BUSKIPTON[CENTER][COLOR=#161120][B]ON 13-14[/B][/COLOR][/CENTER]

and

HTML:
Excel 2012ABCDEFGHIJKLMN1301217314/05/2014UK12486430059318072013MLIMX 01UK12486430059318-07-2013MLIMX£92513 months, 24 days 18/11/2014BUSKIPTON[CENTER][COLOR=#161120][B]ON 13-14[/B][/COLOR][/CENTER]


I would like it so i can choose the two dates that i would like it to be between and then out of the thousand or so rows of data, say 40-50 appear on the second sheet where their contents in column L lies between the two dates I wish.

Help would be greatly appreciated.

Please feel free to ask questions.

:) Thanks
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,213,536
Messages
6,114,202
Members
448,554
Latest member
Gleisner2

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