I’m looking for help to develop some code to add numbers in two columns. I CAN NOT use a formula because their is problems with other VBA code I run in the same cell range when I do that.
The code would search 2 ranges G4:G10, L4:L10 (I will need to be able to add additional ranges). Some cells will have no data in them and others will have data (numbers, 2 decimal places). Some ranges may or may not have numbers in them but there will always be 1 or more numbers (to be added up) in at least one of the ranges.
So in my sample data image the first range G4:G10 in cell G4 has number 1.00, cell G9 has a 2.00. The code will add up the two numbers and reference cell E3 which has a 1-1 in it. Using the 1-1 reference the code wold then search range B3:B4 for the 1-1 and then write the added numbers in the adjacent cell C3. Code would do the same procedure for each range. If a range has no numbers please have the code write a 0 in the appropriate cell in the C column.
The 2 cell range are formatted as numbers and the sets of numbers (cells E3 and J3) are formatted as text.
That would do it. If you have any questions or something is not clear please let me know so I can clarify it.
Thanks so much for all your help.
SAMPLE DATA.png
Bookmarks