LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Still having problem with IF-Then statement

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF Statement problem MarkFrost39 Excel Worksheet Functions 0 September 6th 07 02:50 PM
IF statement problem webstju Excel Worksheet Functions 3 April 21st 06 12:58 PM
Re - If Statement Problem Robert Hargreaves Excel Programming 0 May 28th 05 01:30 PM
If Statement problem Robert Hargreaves Excel Programming 1 May 28th 05 01:12 PM
Problem with if statement Marie Excel Programming 13 February 7th 05 01:25 AM


All times are GMT +1. The time now is 10:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"