Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default End Macro If Cell Formula produces "#VALUE!"

I'd like to make a small error catch in a macro that will halt it if a
formula produces an error of #VALUE!

I was thinking something like this:

If Range("C25").Value = "#VALUE!" Then
MsgBox "Please Login before executing this macro"
Exit Sub
End If

Obviously my syntax is off. Can someone help me with this?

Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default End Macro If Cell Formula produces "#VALUE!"

you could use something like this

If IsError(Range("a1")) Then
MsgBox "Please Login before executing this macro"
Exit Sub
End If

--


Gary


"slim" wrote in message
news:5P%gf.12128$Lw6.3130@trndny02...
I'd like to make a small error catch in a macro that will halt it if a
formula produces an error of #VALUE!

I was thinking something like this:

If Range("C25").Value = "#VALUE!" Then
MsgBox "Please Login before executing this macro"
Exit Sub
End If

Obviously my syntax is off. Can someone help me with this?

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default End Macro If Cell Formula produces "#VALUE!"

If IsError(Range("C25").Value) Then
MsgBox "Please Login before executing this macro"
Exit Sub
End If


--

HTH

RP
(remove nothere from the email address if mailing direct)


"slim" wrote in message
news:5P%gf.12128$Lw6.3130@trndny02...
I'd like to make a small error catch in a macro that will halt it if a
formula produces an error of #VALUE!

I was thinking something like this:

If Range("C25").Value = "#VALUE!" Then
MsgBox "Please Login before executing this macro"
Exit Sub
End If

Obviously my syntax is off. Can someone help me with this?

Thanks.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default End Macro If Cell Formula produces "#VALUE!"

Excellent...works great...Thanks!
"Bob Phillips" wrote in message
...
If IsError(Range("C25").Value) Then
MsgBox "Please Login before executing this macro"
Exit Sub
End If


--

HTH

RP
(remove nothere from the email address if mailing direct)


"slim" wrote in message
news:5P%gf.12128$Lw6.3130@trndny02...
I'd like to make a small error catch in a macro that will halt it if a
formula produces an error of #VALUE!

I was thinking something like this:

If Range("C25").Value = "#VALUE!" Then
MsgBox "Please Login before executing this macro"
Exit Sub
End If

Obviously my syntax is off. Can someone help me with this?

Thanks.






Reply
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
Formula Result is "V6", need Excel to use cell "V6", not the resul Erik Excel Worksheet Functions 3 September 5th 08 03:10 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
=randbetween still produces "#name?" after running the add-In runbball Excel Worksheet Functions 2 January 3rd 07 04:19 PM
Adding more than 3 cells (2003)produces "0" but no error message garden girl Excel Worksheet Functions 4 August 30th 06 02:11 PM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM


All times are GMT +1. The time now is 06:43 PM.

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"