VBA Help - Need to build an Range Array using the Find Method -Excel 2016

Johnny Thunder

Well-known Member
Joined
Apr 9, 2010
Messages
693
Office Version
  1. 2016
Platform
  1. MacOS
Hi Group,

I am working on a project and have hit a road block. I need to build code to create a range array with a "," separator for each found instance (Example: A2,A5,A8 )

Using this array, I will add the string Formula = "-Sum(" & Code & ")" to create what I need.

Currently my data is across 22 Columns.

The functional data is in column (5) starting at Row (12:100) , if the value in column 5 is "Offset" then define the value adjacent to "Offset" in Column 4 defined as my search criteria and then to look at the entire column (4) excluding the row where the offset was found and to incrementally build an array with all the found values, and then in Column 11 enter my sum formula with the range array.

The reason for doing this in this way and not just using a SumIF is due to the possibility of having two Offset columns on top of each other and having the formulas looking at each other and causing a circular reference.

I have tried several methods and the above approach seems to be the only fool proof method to get this done.


Any help is appreciated. And if any clarification is needed please shoot a reply and I will clear anything up.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Could you post your sample data as table?
And describe what you're trying to do using that sample.
 
Upvote 0

Forum statistics

Threads
1,215,388
Messages
6,124,659
Members
449,178
Latest member
Emilou

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