wallen1605
Board Regular
- Joined
- Dec 15, 2017
- Messages
- 57
Good morning
Please could someone help me with the VBA code to reference individual cells to the left of a merged cell? I know the issues around using merged cells in excel, however i need to keep them in this case.
Basically, i have code that checks column A for the same reference and then merges column H cells (e.g Cells A2, A3, A4 have the same cell value, cells H2, H3, H4 are merged and so on down the rows. Cells B2, B3, B4 each have a number and i need to add these together and show the total in the merged cell of A2, A3, A4, so i need to reference the cells from the merged cell. Obviously i can use an offset of mergearea(1).address but this only retrieves the value in B2. Please could someone help on the code line i need to reference all cells adjacent to the merge cells.
Thanks in advance.
Please could someone help me with the VBA code to reference individual cells to the left of a merged cell? I know the issues around using merged cells in excel, however i need to keep them in this case.
Basically, i have code that checks column A for the same reference and then merges column H cells (e.g Cells A2, A3, A4 have the same cell value, cells H2, H3, H4 are merged and so on down the rows. Cells B2, B3, B4 each have a number and i need to add these together and show the total in the merged cell of A2, A3, A4, so i need to reference the cells from the merged cell. Obviously i can use an offset of mergearea(1).address but this only retrieves the value in B2. Please could someone help on the code line i need to reference all cells adjacent to the merge cells.
Thanks in advance.