Nelson78
Well-known Member
- Joined
- Sep 11, 2017
- Messages
- 526
- Office Version
- 2007
Hello everybody.
I'm attempting to define an Excel area in which, in case of human typing, a macro has to run in order to recalculate automatically values in other cells.
The process suggested by Microsoft, until a certain point, is ok.
https://support.microsoft.com/en-us...un-a-macro-when-certain-cells-change-in-excel
It defines the area in this way:
The problem arises if I have to define an area with variables.
In my case, a previous macro runs in a blank sheet producing an outcome that I cannot know a priori.
I mean: at the end of the macro, the area I've to set is something like this:
for each cell in range B1 and B & lr (last populated row)
if the value of the cell is the word "CODE" than the area I've to set is from cell.offset(0, 2) to the column z of the same row.
Any suggestion?
I'm attempting to define an Excel area in which, in case of human typing, a macro has to run in order to recalculate automatically values in other cells.
The process suggested by Microsoft, until a certain point, is ok.
https://support.microsoft.com/en-us...un-a-macro-when-certain-cells-change-in-excel
It defines the area in this way:
Code:
Set KeyCells = Range("A1:C10")
The problem arises if I have to define an area with variables.
In my case, a previous macro runs in a blank sheet producing an outcome that I cannot know a priori.
I mean: at the end of the macro, the area I've to set is something like this:
for each cell in range B1 and B & lr (last populated row)
if the value of the cell is the word "CODE" than the area I've to set is from cell.offset(0, 2) to the column z of the same row.
Any suggestion?
Last edited: