Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Msgbox if cell is not a value

Hi again,

This proposal fully comply with my wishes.
Thank you.

Kaj Pedersen


"Bob Phillips" skrev i en meddelelse
...
How about

If Range("A2").Value2 < "" And Not IsNumeric(Range("A2").Value2) Then

MsgBox "error"
End If


--

HTH

Bob

"KP" <none wrote in message
...
Hi Bob,

Your first excamle works perfectly but I'm sorry to say that there seems
to be some trouble with the second one.

I want a msgbox if a text or anything else but a value is typed in cell
A2.
If I use the macro below, I get the Msgbox, no matter what I write in A2,
even if I write a value.

If Range("A2").Value2 < "" Then

MsgBox "error"
End If

Hope you can figure out the problem. I use Excel 2003, danish

Kaj Pedersen


"Bob Phillips" skrev i en meddelelse
...
A particular value?

If Range("A2").Value2 < 17 Then

MsgBx "error"

or any value?

If Range("A2").Value2 < "" Then

MsgBx "error"

--

HTH

Bob

"KP" <none wrote in message
...
Hi,

If cell is not a value I want a messagebox.

I have no problems creating the msgbox, but how do I write the macro
checking for a value?

Thanks for any help.

Kaj Pedersen









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
MsgBox when the cell is empty Mia Excel Programming 3 January 19th 10 01:07 PM
How do I display cell name with Msgbox? Bill Renaud Excel Programming 0 September 18th 07 05:33 AM
Get cell name into MsgBox? Ed from AZ Excel Programming 5 August 27th 07 07:06 PM
msgBox after update a cell Claudio Silva Excel Discussion (Misc queries) 10 January 19th 07 10:22 AM
MsgBox containing text from cell Nick Smith[_2_] Excel Programming 5 May 10th 06 04:46 PM


All times are GMT +1. The time now is 05:23 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"