Excel index sum (basic vba question)

Youseepooo

New Member
Joined
Feb 5, 2019
Messages
37
Hello
So im new to VBA, and for one of my WB's i want to sum a certain column up ( Column until a certain row which depends on a range on a different sheet.

For example. If i have payments from day 1 to day 20 in column "B" on sheet "1340 $" and on my "Summary" Sheet i have the days 18,19,20 with only their daily payments. How can i go to a specific sheet and sum a column up until a range depended on a cell value in a different sheet.
I would like someone to help me understand this because i am very eager to learn VBA.


If someone still doesnt understand me let me know and i will provide a sample table with a clear informative question.

Thanks
YM, CIVIL ENGINEER
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Use SUMIFS(). You don't need VBA. If you have Col B as the day and Col A as the amount...
=SUMIFS('1340 $'!$A2:$A100,'1340 $'!$B2:$B100,Sheet1!A2)
* Where Sheet1!A2 contains 18
* Would sum all the amounts where column b has day 18
 
Upvote 0
Yea sorry for late response , I did use sumif() not ifs but I wanted to see if there was an easier way to do it with VBA
 
Upvote 0

Forum statistics

Threads
1,225,740
Messages
6,186,759
Members
453,370
Latest member
juliewar

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