View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Michael Link Michael Link is offline
external usenet poster
 
Posts: 12
Default Formula Editing Macro?

Unfortunately, I'm not sure if that's practical. The spreadsheet is very
large, and some version of this same formula appears in many cells, so I'd be
increasing the size of the sheet beyond practicality with all the input cells
I'd require.

I truly think I'm just screwed.

Thanks for the suggestion, though!

"JMB" wrote:

Can you set up a separate cell for the adjusment, and just reference that
cell in your formulae?

"Michael Link" wrote:

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$1 7,$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