I would like a VBA event for the following. In the Active sheet, the value in D1 can be…
- User
I would like a VBA event for the following.
In the Active sheet, the value in D1 can be found in range A2:A22 in sheet 'Sector Budget' - this is my SECTOR value.
In my Active sheet, are text values in the range D6:D305 - these are my SubSector values.
The SubSector values in D6:D305 can be found in the following rows 2 to 22 in columns C, E, G, I, K, M, O, Q, S, U, W in sheet 'Sector Budget'.
In the Active sheet, for each entry in D6:D305, I also enter a numeric value Offset(0, 1) in the range E6:E305 - this is my COST.
In my Active sheet, when I enter a numeric target COST value in the range E6:E305, find and go to the row in A2:A22 of sheet 'Sector Budget' that matches the SECTOR value of D1 in the Active sheet.
Then on that SECTOR row in sheet 'Sector Budget' find the SubSector value match of the Offset(0, -1) target COST value I entered in the range E6:E305 of the Active sheet'.
Then, I want the numeric target COST value which I entered in the range E6:E305 of my Active Sheet to be added (not overwritten) to the Offset(0, 1) value in sheet 'Sector Budget' where the SubSector match was found.
- Assistant
- User
When I run the code, I get a Run-time error '424': Object required, on the line 'If Not Intersect(Target, activeSheet.Range("E6:E305")) Is Nothing Then'
- Assistant