Use of index for multiple sheets and match for three criteria

sucitanr

New Member
Joined
May 17, 2018
Messages
13

Hi ,

I am making a format of salary slip using index and match function.
i am trying that if i put the month and emp. id the rest data should come automatically to that payslip format. but i have 12 worksheet having 12 month salary on it. and in that i have already made table of the salary made for particular month naming the table name.
now i want to use index formula for all the worksheet and match formula in such a way that if i just put the month and emp id i get the pay slip made for the particluar employee.
my every worksheet has the below header:-

[TABLE="class: gmail-wysiwyg_dashes, width: 300"]
<tbody>[TR]
[TD]emp id[/TD]
[TD]name[/TD]
[TD]month[/TD]
[TD]lwp[/TD]
[TD]salary payable[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]praveen[/TD]
[TD]may'18[/TD]
[TD]1[/TD]
[TD]18000[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]deepak[/TD]
[TD]may'18[/TD]
[TD]0[/TD]
[TD]9000[/TD]
[/TR]
</tbody>[/TABLE]


this is may month salary worksheet. like this i have 11 more month salary work sheet.

and i have made a format of payslip in which i have put all the details.i am trying for a formula through which if i just put month and emp id ,i get the data in the desire colums of that payslip from the desired worksheet.

Plz can u help.
 
Thanks . I tried the formula and i am able to do it now.

But can u plz explain me the formula as still i didnt understand the logic of 4 and 1 in VLOOKUP(B2,INDIRECT(REPLACE($D$1,4,1,"_")),5,0).

Thanks for the help again.
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Thanks . I tried the formula and i am able to do it now.

Great to hear that.

But can u plz explain me the formula as still i didnt understand the logic of 4 and 1 in VLOOKUP(B2,INDIRECT(REPLACE($D$1,4,1,"_")),5,0).

Thanks for the help again.

D1 contains a value like may'18. We want to get from this may_18, that is, replace this ' token with this _ token,
because may_18 is a name we can feed INDIRECT with to obtain the table corresponding to that month.

The position of the ' token in may'18 is 4. REPLACE is asked to insert the _ token whose length is 1. SUBSTITUTE(D1,"'","_") would here effect the same result.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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