M
Michael Link
I have a large spreadsheet with many iterations of the same basic formula:
=IF($F18="Y",IF(V18<U18,IF(U18=0,0,WORKDAY(U18,X$17,$Z$5:$AB$13)),IF(V18=0,0,WORKDAY(V18,X$17,$Z$5:$AB$13))),IF(V18<U18,IF(U18=0,0,WORKDAY(U18,X$17,$Z$5:$Z$13)),IF(V18=0,0,WORKDAY(V18,X$17,$Z$5:$Z$13))))
Users often need to edit the embedded WORKDAY functions to add or subtract
days from the value referenced in X17. In the example above, a user would
need add "+7" after the "X17" to add 7 days, and they need to do it four
times since the WORKDAY function appears four times. (They can't just change
the value in X17, because other cells feed off of X17 which do not require
adjustment.)
Is it possible to write a macro to simplify this routine, so that, when run,
a pop-up box would ask the user for the number of days they want to add or
subtract from the WORKDAY function in the active cell's formula, no matter
what that larger formula's syntax was? (Essentailly, the macro would need to
identify and alter ONLY the WORKDAY function in the active cell.) Or is this
just one of those impossible things?
Thanks for any guidance anyone can offer!
Depressed in Excelworld
=IF($F18="Y",IF(V18<U18,IF(U18=0,0,WORKDAY(U18,X$17,$Z$5:$AB$13)),IF(V18=0,0,WORKDAY(V18,X$17,$Z$5:$AB$13))),IF(V18<U18,IF(U18=0,0,WORKDAY(U18,X$17,$Z$5:$Z$13)),IF(V18=0,0,WORKDAY(V18,X$17,$Z$5:$Z$13))))
Users often need to edit the embedded WORKDAY functions to add or subtract
days from the value referenced in X17. In the example above, a user would
need add "+7" after the "X17" to add 7 days, and they need to do it four
times since the WORKDAY function appears four times. (They can't just change
the value in X17, because other cells feed off of X17 which do not require
adjustment.)
Is it possible to write a macro to simplify this routine, so that, when run,
a pop-up box would ask the user for the number of days they want to add or
subtract from the WORKDAY function in the active cell's formula, no matter
what that larger formula's syntax was? (Essentailly, the macro would need to
identify and alter ONLY the WORKDAY function in the active cell.) Or is this
just one of those impossible things?
Thanks for any guidance anyone can offer!
Depressed in Excelworld