ihateexcell
New Member
- Joined
- Aug 8, 2023
- Messages
- 5
- Office Version
- 365
- Platform
- Windows
Basically what I am trying to do is to log a sum of value in ActiveCell, whilst referencing a column's empty column cell on Sheet B using offset to sum the values above
Will appreciate any help and advise as I am intending to create one macro for each dropdown value of SheetA!A1 i.e. Apple run Macro A to sum 2 cells above empty cell of Apple column in Sheet B, Orange run Macro to sum 10 cells above empty cell of Orange column in Sheet B and log onto activeCell
I understand that you have to use ```Range("A" & Rows.Count).End(x1Up).Offset(1) ```and ```WorksheetFunction.Sum(Worksheets("Sheet B").Range("A2:A3"))``` but I am unsure of how do I combine these 2
Will appreciate any help and advise as I am intending to create one macro for each dropdown value of SheetA!A1 i.e. Apple run Macro A to sum 2 cells above empty cell of Apple column in Sheet B, Orange run Macro to sum 10 cells above empty cell of Orange column in Sheet B and log onto activeCell
Sheet A | Sheet B |
A1 | |
A2 | |
ActiveCell(Sheet B!A3 value) | A3(Sum of A1 and A2 but using offset) |
I understand that you have to use ```Range("A" & Rows.Count).End(x1Up).Offset(1) ```and ```WorksheetFunction.Sum(Worksheets("Sheet B").Range("A2:A3"))``` but I am unsure of how do I combine these 2