Summing values from various sheets in a file based on employee id

sivasankar

New Member
Joined
Dec 15, 2014
Messages
2
Hi,

Please find the following data of 12 sheets (12 months) and i have named each sheet like jan, feb, mar, .....& Dec.


31Gross Salary per MonthEarnings per MonthDeductionsNet Salary
Emp CodeLocationNAME OF THE EMPLOYEEPresent DaysBasicHRACon AllowMedical ReimbUniform AllowSpl AllowTotalBasicHRACon. AllowMedical ReimbUniform AllowSpl AllowTotalPFPTTDSTotal
100002BanglorePraveen311536376828001250100028312892615363768280012501000283128926780200098027946
100003Hyderabad Siva3085338426698001250250025321157878825854129377412102419245041527857802000980151805
100004Hyderabad sankar25573902869580012502500150221056574628223141645100820161211585207780200100001098074227
100005BangloreRao201024055120380012502500316121897706606833034516806161320395122432780200570685804864384
100006BangloreKumar311595979808001250100034863047515959798080012501000348630475780200098029495
100007Indorehari3157390286958001250250015022105657573902869580012502500150221056577802008696967695981

<colgroup><col><col><col><col span="2"><col><col><col><col><col><col><col><col><col><col><col><col><col><col span="2"><col span="2"><col></colgroup><tbody>
</tbody>

<colgroup><col><col><col><col span="2"><col><col><col><col><col><col><col><col><col><col><col><col><col><col span="2"><col><col><col><col><col></colgroup><tbody>
</tbody>

And i am trying to add the values based on emp code from all sheets into another sheet. I have tried with VLOOKUP and its working if the emp code is exists in those months / sheets. if emp code is not there it is giving error #N/A.

the code which i have tried is

=+VLOOKUP(B7,apr,26,FALSE)+VLOOKUP(B7,may,26,FALSE)+VLOOKUP(B7,jun,26,FALSE)+VLOOKUP(B7,Jul,26,FALSE)+VLOOKUP(B7,Aug,26,FALSE)+VLOOKUP(B7,Sep,26,FALSE)+VLOOKUP(B7,Oct,26,FALSE)+VLOOKUP(B7,Nov,26,FALSE)+VLOOKUP(B7,Dec,26,FALSE)+VLOOKUP(B7,Jan,26,FALSE)+VLOOKUP(B7,Feb,26,FALSE)+VLOOKUP(B7,Mar,26,FALSE)

please help me in simplifying the code.

thanks in Advance.

Siva Sankar
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,215,352
Messages
6,124,455
Members
449,161
Latest member
NHOJ

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