I have a Macro that sets the value of a cell from other cell values.
So the Macro sets the value of a cell when I run the code as usual.
But I want the Macro work like a Formula.
So the value of a cell always changes when those cells are change.
Is there any way to do this?
Or Maybe a way to call the Macro from formula?
Edit: (After Comments)
Ok. This is what I want from the Macro.
I have Hours:Minutes, and I want to SUM all of them.
The problem is I have negative Hours:Minutes that I've calculated them using the formula below:
=TEXT(ABS(H10-E10),"-h:mm")
So I have something like this:
08:20, 02:10, -03:20, [and so on...]
And I want the result:
08 + 02 - 03 = 07
20 + 10 - 20 = 10
= 07:10 (The Result)
Because we don't have negative Time in Excel, and I have Text instead of Time, so I have to calculate them with ForLoop in VBA.