How do I log a value on Sheet A that I summed the column cells using offset from Sheet B

ihateexcell

New Member
Joined
Aug 8, 2023
Messages
5
Office Version
  1. 365
Platform
  1. 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

Sheet ASheet 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
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Explain what is below the so-called "column's empty column cell on Sheet B" ... as, if that is also empty you could really simplify your logic.
 
Upvote 0
Yeap, what I meant was to sum everything above the empty cell but I figured out a way to do it via INDEX MATCH function
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,259
Members
452,626
Latest member
huntinghunter

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top