VBA define multiple range within a worksheet

EMcK01

Board Regular
Joined
Jun 14, 2015
Messages
110
Hi,

I'm struggling to start this as I'm not sure how to make the script at different ranges within the worksheet.

I need to define a range to form a sum equation when it finds the first blank cell in the column, there is always a block of 3 blank rows together. I then need to repeat this for the next range of cells down the column.

As the ranges will always change I'm not sure how to make this dynamic so that it will find the first and last cell of the next range and step 3 rows once it finds a blank cell to then continue the loop again.

Any help would be appreciated.

Thanks
 

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

johnnyL

Well-known Member
Joined
Nov 7, 2011
Messages
1,423
Office Version
  1. 2013
  2. 2007
Platform
  1. Windows
So, It sounds like you want to search a column for values to add up

1) Find the first value in the column to be added, add that first found value to a running total, continue down the column, adding the values in that column until a blank cell is encountered in that column, at that point, place the running total in that blank cell.

Continue down the column until you find the next value in that same column. start keeping another running total until a blank cell is encountered in that column, at that point, place the running total in that blank cell

Repeat process until the last used cell in that column is encountered and added.


That sound about right?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
63,608
Office Version
  1. 365
Platform
  1. Windows
I've already answered this in your previous thread. :)
 
Solution

EMcK01

Board Regular
Joined
Jun 14, 2015
Messages
110
Hi Guys,

thanks for responding. I had started to put something together but Fluff sorted it right out for me.

Thanks for the response though, its appreciated.

EMcK
 

Forum statistics

Threads
1,143,619
Messages
5,719,769
Members
422,244
Latest member
AYSHANA

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
Top