Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I hate to keep taking up space for this, but it just won't work for me.
I've tried to work around it from a differnt angle, but damn, this should work! And, it seems it should be so simple. I really appreciate the reponses I've gotten on this problem. It's very frustrating. Here's the solution given to me before.... and I'm sure it's a good one. But, why doesn't it work for me? 'If Range("Deleted_Today") = 0 Then ' FormatCells ' Else ' Move_Deleted_Records ' End If I want it to look at the range name "Deleted_Today". This is in a worksheet named Touches. It contains a formula that counts any entries in a column in a different worksheet, named Official List. Here's that formula: =COUNTA('Official List'!P6:P4366) If there are any entries in that column, the number will be more than 0 in "Deleted_Today". If that is the case, I want the macro to go to the sub named FormatCells. If there is anything greater than 0 in "Deleted_Today", then it want it to go the sub named Move_Deleted_Records. However there is an error when I run it, and the 1st line of the statement is hightlighted. I've checked all the spellings. Should I specify the worksheets? I was given this statement as an alternative, but I get the same results. If Application.CountA(Range("Deleted_Today")) = 0 Then ' FormatCells ' Else ' Move_Deleted_Records ' End If Does it matter if there is a formula in that cell, or if it just a value? I even tried to replace the formula in "Deleted_Today" with a 0. Same error. No sense in programming if you can't do a simple If-then. My spreadsheet designs are full of If-then formulas. It's the basic tool of spreadsheets design for me. Bob Phillips, you have given me alot of time, and have been very patient. If you, or anyone else can figure out what stupid mistake I'm making, I would greatly appreciate it. Thanks HELP!! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF Statement problem | Excel Worksheet Functions | |||
IF statement problem | Excel Worksheet Functions | |||
Re - If Statement Problem | Excel Programming | |||
If Statement problem | Excel Programming | |||
Problem with if statement | Excel Programming |