Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with macro
I would like to make a macro with the following formula
=IF(C3="","",((40-((C3-(TODAY())))/7))) it needs to calculate a gestational age when the due date is put in from L5 to L169.. I cant seem to get it to lock so the formula doesnt get deleted so I thought a macro would work?? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with macro
I got it to work with no changes. Before putting the formula into worksheet
make sure C3 is empty. Highlight the cell where you want the formula and then paste the forula at the top of the worksheet in the fx box (formmula box). It shuold work. "hannatrip" wrote: I would like to make a macro with the following formula =IF(C3="","",((40-((C3-(TODAY())))/7))) it needs to calculate a gestational age when the due date is put in from L5 to L169.. I cant seem to get it to lock so the formula doesnt get deleted so I thought a macro would work?? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with macro
it works that way, but i cant get it to lock and im afraid when one of the
unit clerks makes a mistake and deletes it it will lose it all. orr what am I doing wrong in locking the cell with the formula in it?? "Joel" wrote: I got it to work with no changes. Before putting the formula into worksheet make sure C3 is empty. Highlight the cell where you want the formula and then paste the forula at the top of the worksheet in the fx box (formmula box). It shuold work. "hannatrip" wrote: I would like to make a macro with the following formula =IF(C3="","",((40-((C3-(TODAY())))/7))) it needs to calculate a gestational age when the due date is put in from L5 to L169.. I cant seem to get it to lock so the formula doesnt get deleted so I thought a macro would work?? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with macro
This function gave me the same answerr as the worksheett function
Function GetGest(cell As Range) If IsEmpty(cell) Then GetGest = "" Else GetGest = 40 - ((cell - Date) / 7) End If End Function "hannatrip" wrote: it works that way, but i cant get it to lock and im afraid when one of the unit clerks makes a mistake and deletes it it will lose it all. orr what am I doing wrong in locking the cell with the formula in it?? "Joel" wrote: I got it to work with no changes. Before putting the formula into worksheet make sure C3 is empty. Highlight the cell where you want the formula and then paste the forula at the top of the worksheet in the fx box (formmula box). It shuold work. "hannatrip" wrote: I would like to make a macro with the following formula =IF(C3="","",((40-((C3-(TODAY())))/7))) it needs to calculate a gestational age when the due date is put in from L5 to L169.. I cant seem to get it to lock so the formula doesnt get deleted so I thought a macro would work?? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with macro
Thank you!!
"Joel" wrote: This function gave me the same answerr as the worksheett function Function GetGest(cell As Range) If IsEmpty(cell) Then GetGest = "" Else GetGest = 40 - ((cell - Date) / 7) End If End Function "hannatrip" wrote: it works that way, but i cant get it to lock and im afraid when one of the unit clerks makes a mistake and deletes it it will lose it all. orr what am I doing wrong in locking the cell with the formula in it?? "Joel" wrote: I got it to work with no changes. Before putting the formula into worksheet make sure C3 is empty. Highlight the cell where you want the formula and then paste the forula at the top of the worksheet in the fx box (formmula box). It shuold work. "hannatrip" wrote: I would like to make a macro with the following formula =IF(C3="","",((40-((C3-(TODAY())))/7))) it needs to calculate a gestational age when the due date is put in from L5 to L169.. I cant seem to get it to lock so the formula doesnt get deleted so I thought a macro would work?? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with macro
By default, all cells are protected when sheet protection is enabled.
Hit CTRL + a(twice in 2003) to select all cells. FormatCellsProtection. Uncheck "locked" Select the cells you want protected and FormatCellsProtection Check "locked". ToolsProtectionProtect Sheet. Note the options when protecting. Supply a password and OK. Excel's internal security is weak but this will prevent overwriting by accident. Gord Dibben MS Excel MVP On Wed, 14 Mar 2007 11:51:32 -0700, hannatrip wrote: it works that way, but i cant get it to lock and im afraid when one of the unit clerks makes a mistake and deletes it it will lose it all. orr what am I doing wrong in locking the cell with the formula in it?? "Joel" wrote: I got it to work with no changes. Before putting the formula into worksheet make sure C3 is empty. Highlight the cell where you want the formula and then paste the forula at the top of the worksheet in the fx box (formmula box). It shuold work. "hannatrip" wrote: I would like to make a macro with the following formula =IF(C3="","",((40-((C3-(TODAY())))/7))) it needs to calculate a gestational age when the due date is put in from L5 to L169.. I cant seem to get it to lock so the formula doesnt get deleted so I thought a macro would work?? |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with macro
Thanks you, I finally got it to work!
"Gord Dibben" wrote: By default, all cells are protected when sheet protection is enabled. Hit CTRL + a(twice in 2003) to select all cells. FormatCellsProtection. Uncheck "locked" Select the cells you want protected and FormatCellsProtection Check "locked". ToolsProtectionProtect Sheet. Note the options when protecting. Supply a password and OK. Excel's internal security is weak but this will prevent overwriting by accident. Gord Dibben MS Excel MVP On Wed, 14 Mar 2007 11:51:32 -0700, hannatrip wrote: it works that way, but i cant get it to lock and im afraid when one of the unit clerks makes a mistake and deletes it it will lose it all. orr what am I doing wrong in locking the cell with the formula in it?? "Joel" wrote: I got it to work with no changes. Before putting the formula into worksheet make sure C3 is empty. Highlight the cell where you want the formula and then paste the forula at the top of the worksheet in the fx box (formmula box). It shuold work. "hannatrip" wrote: I would like to make a macro with the following formula =IF(C3="","",((40-((C3-(TODAY())))/7))) it needs to calculate a gestational age when the due date is put in from L5 to L169.. I cant seem to get it to lock so the formula doesnt get deleted so I thought a macro would work?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Need syntax for RUNning a Word macro with an argument, called from an Excel macro | Excel Programming | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |