Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
formula in one cell needs to use a figure from another cell but it crashes
I have the follwoing code:
If Target.Address = "$F$165" Then Rows(167).Resize(25).Hidden = True If Target.Value = "No" Then _ Rows(167).Resize(F17 * 5).Hidden = False End If F165 gives a Yes or No response. There are 25 rows hidden from 167 to 192. If the response in 165 is NO, then it is to unhide a portion of those 25 rows. The portion I want unhidded is the cell F17 times 5 (where F17 is a number between 1 and 5) However I try to write that formula around that second Resize command I get an error. I cannot figure what is wrong. Help please! RU |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
formula in one cell needs to use a figure from another cell but it crashes
If Target.Address = "$F$165" Then
Rows(167).Resize(25).Hidden = True If Target.Value = "No" Then _ Rows(167).Resize(Range("F17") * 5).Hidden = False End If Should work. Regards, Tom Ogilvy "RU_Powers" wrote in message ... I have the follwoing code: If Target.Address = "$F$165" Then Rows(167).Resize(25).Hidden = True If Target.Value = "No" Then _ Rows(167).Resize(F17 * 5).Hidden = False End If F165 gives a Yes or No response. There are 25 rows hidden from 167 to 192. If the response in 165 is NO, then it is to unhide a portion of those 25 rows. The portion I want unhidded is the cell F17 times 5 (where F17 is a number between 1 and 5) However I try to write that formula around that second Resize command I get an error. I cannot figure what is wrong. Help please! RU |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
formula in one cell needs to use a figure from another cell but it crashes
Works like a charm, once again thank you! RU On Tue, 9 Sep 2003 15:12:41 -0400, "Tom Ogilvy" wrote: If Target.Address = "$F$165" Then Rows(167).Resize(25).Hidden = True If Target.Value = "No" Then _ Rows(167).Resize(Range("F17") * 5).Hidden = False End If Should work. Regards, Tom Ogilvy "RU_Powers" wrote in message ... I have the follwoing code: If Target.Address = "$F$165" Then Rows(167).Resize(25).Hidden = True If Target.Value = "No" Then _ Rows(167).Resize(F17 * 5).Hidden = False End If F165 gives a Yes or No response. There are 25 rows hidden from 167 to 192. If the response in 165 is NO, then it is to unhide a portion of those 25 rows. The portion I want unhidded is the cell F17 times 5 (where F17 is a number between 1 and 5) However I try to write that formula around that second Resize command I get an error. I cannot figure what is wrong. Help please! RU |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
formula in one cell needs to use a figure from another cell but it crashes
Also,
If F17 is blank there will be an error. And the If statement is case sensitive so that F165 must be "No" not "no"... or change the If to If lcase(Target.Value) = "no" Then _ -- sb "Tom Ogilvy" wrote in message ... If Target.Address = "$F$165" Then Rows(167).Resize(25).Hidden = True If Target.Value = "No" Then _ Rows(167).Resize(Range("F17") * 5).Hidden = False End If Should work. Regards, Tom Ogilvy "RU_Powers" wrote in message ... I have the follwoing code: If Target.Address = "$F$165" Then Rows(167).Resize(25).Hidden = True If Target.Value = "No" Then _ Rows(167).Resize(F17 * 5).Hidden = False End If F165 gives a Yes or No response. There are 25 rows hidden from 167 to 192. If the response in 165 is NO, then it is to unhide a portion of those 25 rows. The portion I want unhidded is the cell F17 times 5 (where F17 is a number between 1 and 5) However I try to write that formula around that second Resize command I get an error. I cannot figure what is wrong. Help please! RU |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel workbook crashes when changing data in cell. | Excel Discussion (Misc queries) | |||
Single-cell formula to figure multiple percentages | Excel Discussion (Misc queries) | |||
Want to make formula automatically figure out cell number in the r | Excel Discussion (Misc queries) | |||
Formatting a cell crashes Excel | Setting up and Configuration of Excel | |||
Why Excel crashes everytime a cell is entered? | Excel Discussion (Misc queries) |