ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Combining two sheets of data into one and sorting by value - using macros (https://www.excelbanter.com/excel-worksheet-functions/449316-combining-two-sheets-data-into-one-sorting-value-using-macros.html)

frankjh19701

Combining two sheets of data into one and sorting by value - using macros
 
O.K. I'm working on it again.

This time I'm trying to configure a way to do the same outcome to two different sheets in the same workbook and copy the correct information into a third.

For example,

Miles driven, vehicle # , and Date are in one sheet (Sheet 2) and Date, vehicle #, and gallons of fuel purchased are in another sheet (Sheet 3).

What I need is in another sheet (Vehicle #) copy the appropriate information found in the two different sheets and paste it into the third (Vehicle #) sheet.

Basically, combining the information sorted by date into the vehicle's unique sheet in the same workbook.

Any/all assistance would be greatly appreciated.

Thank you

Alexander Frolov

Quote:

Originally Posted by frankjh19701 (Post 1614148)
Basically, combining the information sorted by date into the vehicle's unique sheet in the same workbook.
Any/all assistance would be greatly appreciated.
Thank you

Do I understand you right that you want to merge your two worksheets by matching the data in the "Date" and Vehicle# columns?

frankjh19701

Quote:

Originally Posted by Alexander Frolov (Post 1614152)
Do I understand you right that you want to merge your two worksheets by matching the data in the "Date" and Vehicle# columns?

I've tried to attach a sample, but it won't allow it. The first sheet in the workbook has "Date" "Vehicle Number" "Driver" "Mileage" "Gallons Purchased".

The second sheet has "Date" "Vehicle Number" "Driver" "Mileage".

The final sheet should have all of these columns merged in such a way that you can tell the vehicles MPG rating versus miles driven.

When I've tried to combine these sheets, I can only merge the rows - I cannot get them to match the dates with the vehicles and then the gallons purchased with the mileage listed for that vehicle on the specific day.

I know without a visual representation, it's difficult. but, if you set up a workbook with the column headers I mentioned, you should be able to figure it out - I hope :)

Thanks

Alexander Frolov

Quote:

Originally Posted by frankjh19701 (Post 1614173)
I know without a visual representation, it's difficult. but, if you set up a workbook with the column headers I mentioned, you should be able to figure it out - I hope :)

Yes, it is difficult to advise anything specific without seeing your data.

If both your worksheets hve only one record per "Vehicle Number" + "Date" (i.e Vehicle Number mentioned only once for that day) then you can match and combine your data using Merge Worksheets addin for Excel.

If it is not so (you have several records) then please compress your Sample workbook to a .zip file (or just rename .xls to .zip) and upload it to the forum using the "Manage Attachments" button.
I'll see what can be done.

frankjh19701

1 Attachment(s)
Quote:

Originally Posted by Alexander Frolov (Post 1614198)
Yes, it is difficult to advise anything specific without seeing your data.

If both your worksheets hve only one record per "Vehicle Number" + "Date" (i.e Vehicle Number mentioned only once for that day) then you can match and combine your data using Merge Worksheets addin for Excel.

If it is not so (you have several records) then please compress your Sample workbook to a .zip file (or just rename .xls to .zip) and upload it to the forum using the "Manage Attachments" button.
I'll see what can be done.

O.K. I tried uploading the file. Please take a look at it and let me know.

Thank you again

frankjh19701

Quote:

Originally Posted by Alexander Frolov (Post 1614198)
Yes, it is difficult to advise anything specific without seeing your data.

If both your worksheets hve only one record per "Vehicle Number" + "Date" (i.e Vehicle Number mentioned only once for that day) then you can match and combine your data using Merge Worksheets addin for Excel.

If it is not so (you have several records) then please compress your Sample workbook to a .zip file (or just rename .xls to .zip) and upload it to the forum using the "Manage Attachments" button.
I'll see what can be done.

Have you found anything?

frankjh19701

Quote:

Originally Posted by Alexander Frolov (Post 1614198)
Yes, it is difficult to advise anything specific without seeing your data.

If both your worksheets hve only one record per "Vehicle Number" + "Date" (i.e Vehicle Number mentioned only once for that day) then you can match and combine your data using Merge Worksheets addin for Excel.

If it is not so (you have several records) then please compress your Sample workbook to a .zip file (or just rename .xls to .zip) and upload it to the forum using the "Manage Attachments" button.
I'll see what can be done.

Can anyone assist me with this? The report is coming due and I really need help. Thank you


All times are GMT +1. The time now is 04:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com