Vlookup - when there might be more then one line

gails58

New Member
Joined
Aug 19, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
I am do a compare of two different spreadsheets, it is working fine, except in cases when the employee has more than one line of data. I want it to add each line together to give me a total. is that possible? For example, I am comparing labor amounts to payroll amounts, so if they charged all time to one code, the vlookup works fine, but if they charged more then 1 code then I am having issues. Any way to get this to work?
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi & welcome to MrExcel.
Can you post some sample data from both sheets, showing expected results.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Unfortunately, my work computer will not allow me to download this add in. An example would be like as follows:
Sheet 1
10000315PD LEAVE
0.250​
7.880​
Regular
87.750​
2,766.760​
Sheet 2
10000315Regular87.7531.532,766.76
Paid leave0.2531.537.88

Sheet 3 is my combination sheet using a vlookup
it pulls the number and the first line. They don't match, as they aren't in the same order and even if they were, they aren't the total. So if all they have is regular hours, it works fine, it is one line. How do I do this to have it include all the lines?
 
Upvote 0
Is the number only on the first line of data, or is it on every line?
 
Upvote 0
Ok, is this what you want
+Fluff 1.xlsm
ABCD
1
210000315PD LEAVE0.257.88
310000315Regular87.752,766.76
Sheet1


+Fluff 1.xlsm
AB
1
21000031588
Sheet2
Cell Formulas
RangeFormula
B2B2=SUM(FILTER(Sheet1!C2:C100,Sheet1!A2:A100=A2))
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,624
Latest member
gregg777

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