ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   New to VBA: Compare workbook ranges, merge data and do additions (https://www.excelbanter.com/excel-programming/367963-new-vba-compare-workbook-ranges-merge-data-do-additions.html)

SueFrost

New to VBA: Compare workbook ranges, merge data and do additions
 
Hi,
Can you please help me out with this.
I'm new to VBA and I've looked at postings
in the group and I haven't been able to find
anything that quite fits what I'm doing.

I have a workbook (Book1) with descriptions in Col A
and numberic values in Col B,C,D and E starting in A14.
It will be generated every month. A division code and
cost code are in Cell A9 as part of a string.

Book1 needs to be compared to a second workbook(Book2)
which is a data table. ColA is Division, ColB is Cost code,
Col C is description and Col D,E,F and G are numeric values.

Book2 range with the same division and cost centre as Book1
neeed to be compared. If the description is the same the
numeric values in Book2 Col F and G need to be added to
Book1 Col D and E. If Book2 has a description that doesn't
match the entire row needs to be added to Book1. Book1 rows
that have no Book2 matches remain in Book1 unchanged.

Any ideas or help in how I should approach this will be
greatly appreciated.

Thanks, Sue



All times are GMT +1. The time now is 03:00 AM.

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