Updating references using the MAX funcion

  • Thread starter Thread starter smylieg
  • Start date Start date
S

smylieg

Having a problem with cell references being updated when I
add or delete a line to a sheet.

I have the following macro in a sheet

=IF(ISNUMBER(E18),IF(ISNUMBER(G17),G17+(E18/1440),MAX
(G12,G16)+E18/1440),"")

If I add or subtract a line in the sheet ahead of this
macro the cell references in the MAX statement do not get
updated correctly. The G12 reference gets updated but the
second value G16 in this case does not get changed
correctly.

Any ideas
Gerry Smylie
 
You have left us guessing as to what G16 becomes and what you would want it
to become.
Let us know more so we can try to help

By the bye: what you have is a "formula" a "macro" is another animal all
together

Best wishes
 
Hi

Don't know if this is suitable but if you change MAX
(G12,G16) to a range MAX(G12:G16) then the referencees
change when copied down to MAX(G13:G16)
MAX(G$12:G16) will retain row 12 in the formula.

Hope this helps
Regards
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top