Kumar Chandra

New Member
Joined
Jun 15, 2018
Messages
13
Please help me below. Hope someone can help me,

I have two workbook like below:
Workbook 1 As below:
S.NoNameLeave StartLeave End Total DaysLeave Type
1AA01-Jan-1704-Jan-17FALSE4Annual Leave
2B08-Jan-1711-Jan-17FALSE4Annual Leave
3AA15-Jan-1718-Jan-17FALSE4Sick Leave
4AA21-Jan-1722-Jan-17FALSE2Annual Leave
5B28-Jan-1705-Feb-17FALSE9Sick Leave
<colgroup><col width="72" style="width: 54pt;"> <col width="83" style="width: 62pt; mso-width-source: userset; mso-width-alt: 2656;" span="5"> <col width="112" style="width: 84pt; mso-width-source: userset; mso-width-alt: 3584;"> <tbody> </tbody>


Workbook 2 Dates are in DD format
Date 1-jan to 27 Jan
Name010203040506070809101112131415161718192021222324252627
AA111111111111111111111111111
B111111111111111111111111111
<colgroup><col width="77" style="width: 58pt; mso-width-source: userset; mso-width-alt: 2464;"> <col width="29" style="width: 22pt; mso-width-source: userset; mso-width-alt: 928;" span="27"> <tbody> </tbody>


I want result as below (AL= Annual Leave, SL = Sick Leave...)
Date
Name010203040506070809101112131415161718192021222324252627
AAALALALAL1111111111SLSLSLSL11ALAL11111
B1111111ALALALAL1111111111111111
<colgroup><col width="77" style="width: 58pt; mso-width-source: userset; mso-width-alt: 2464;"> <col width="29" style="width: 22pt; mso-width-source: userset; mso-width-alt: 928;" span="27"> <tbody> </tbody>

Thank you
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Crazy, No one replied: Finally I got answer after 3 Days.

=IFERROR(IF(INDEX($G$19:$G$24,MATCH(1,($C$19:$C$24<=N$6)*($D$19:$D$24>=N$6)*($B$19:$B$24=$M37),0))="Annual Leave","AL",IF(INDEX($G$19:$G$24,MATCH(1,($C$19:$C$24<=N$6)*($D$19:$D$24>=N$6)*($B$19:$B$24=$M37),0))="Sick Leave","SL","")),1)
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,942
Members
449,094
Latest member
teemeren

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