Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Need "if" with msgbox result

The user inputs values into column B, starting in B1. The number of
values varies from a dozen to several hundred. The values are
typically copy/pasted from another spreadsheet.

Cell B500 counts the number of values the user entered, with COUNTA
(B1:B499).

I need a msgbox or error message to appear if B500 does not equal a
number in C500.

The usual Validation tool in the "Data" menu works fine IF the number
in B500 is input by the user. If the number in B500 the result of a
formula, though (i.e. COUNTA), the validation doesn't work! Seems like
you can't have a calculation and a validation in the same cell....

So I was trying to write an IF formula that would trigger a msgbox
saying "the number of values entered is not correct" if B500 doesn't
equal C500.

Something like:
= if(B500=C500,"",msgboxmacro)

No luck. Dead as a doornail. Can somebody please help? Surely there's
a way to do this. I need SOME way to alert the user to the fact that
the number of values entered doesn't equal the number in C500.

Thanks. Please reply to the newsgroup.

Bill S.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Need "if" with msgbox result

On Apr 15, 5:03 pm, Dave Peterson wrote:
I'd use an adjacent cell (column D???) and format it in nice big bold red
letters.



wrote:

The user inputs values into column B, starting in B1. The number of
values varies from a dozen to several hundred. The values are
typically copy/pasted from another spreadsheet.


Cell B500 counts the number of values the user entered, with COUNTA
(B1:B499).


I need a msgbox or error message to appear if B500 does not equal a
number in C500.


The usual Validation tool in the "Data" menu works fine IF the number
in B500 is input by the user. If the number in B500 the result of a
formula, though (i.e. COUNTA), the validation doesn't work! Seems like
you can't have a calculation and a validation in the same cell....


So I was trying to write an IF formula that would trigger a msgbox
saying "the number of values entered is not correct" if B500 doesn't
equal C500.


Something like:
= if(B500=C500,"",msgboxmacro)


No luck. Dead as a doornail. Can somebody please help? Surely there's
a way to do this. I need SOME way to alert the user to the fact that
the number of values entered doesn't equal the number in C500.


Thanks. Please reply to the newsgroup.


Bill S.


--

Dave Peterson


Thanks, Dave. Yes, that's one way to do it: conditional formatting. So
if it's not equal to C500, it becomes bright red and boldface. Also,
the next cell, C500, uses an IF formula to say "ERROR!!!!" in bright
red/boldface as well. The main point is to be 100% reliable in
alerting the user to the error. Guess that'll work. Still, a msgbox
is better, because they have to look at it and click an "OK" button to
continue working. You can't "miss" it.

Thanks,
Bill S.
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Need "if" with msgbox result

If you have 500 incorrect responses, would you want 500 message boxes popping
up? I wouldn't.

wrote:

On Apr 15, 5:03 pm, Dave Peterson wrote:
I'd use an adjacent cell (column D???) and format it in nice big bold red
letters.



wrote:

The user inputs values into column B, starting in B1. The number of
values varies from a dozen to several hundred. The values are
typically copy/pasted from another spreadsheet.


Cell B500 counts the number of values the user entered, with COUNTA
(B1:B499).


I need a msgbox or error message to appear if B500 does not equal a
number in C500.


The usual Validation tool in the "Data" menu works fine IF the number
in B500 is input by the user. If the number in B500 the result of a
formula, though (i.e. COUNTA), the validation doesn't work! Seems like
you can't have a calculation and a validation in the same cell....


So I was trying to write an IF formula that would trigger a msgbox
saying "the number of values entered is not correct" if B500 doesn't
equal C500.


Something like:
= if(B500=C500,"",msgboxmacro)


No luck. Dead as a doornail. Can somebody please help? Surely there's
a way to do this. I need SOME way to alert the user to the fact that
the number of values entered doesn't equal the number in C500.


Thanks. Please reply to the newsgroup.


Bill S.


--

Dave Peterson


Thanks, Dave. Yes, that's one way to do it: conditional formatting. So
if it's not equal to C500, it becomes bright red and boldface. Also,
the next cell, C500, uses an IF formula to say "ERROR!!!!" in bright
red/boldface as well. The main point is to be 100% reliable in
alerting the user to the error. Guess that'll work. Still, a msgbox
is better, because they have to look at it and click an "OK" button to
continue working. You can't "miss" it.

Thanks,
Bill S.


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Need "if" with msgbox result

And you'd get those message boxes each time excel reevaluated the formula.

Dave Peterson wrote:

If you have 500 incorrect responses, would you want 500 message boxes popping
up? I wouldn't.

wrote:

On Apr 15, 5:03 pm, Dave Peterson wrote:
I'd use an adjacent cell (column D???) and format it in nice big bold red
letters.



wrote:

The user inputs values into column B, starting in B1. The number of
values varies from a dozen to several hundred. The values are
typically copy/pasted from another spreadsheet.

Cell B500 counts the number of values the user entered, with COUNTA
(B1:B499).

I need a msgbox or error message to appear if B500 does not equal a
number in C500.

The usual Validation tool in the "Data" menu works fine IF the number
in B500 is input by the user. If the number in B500 the result of a
formula, though (i.e. COUNTA), the validation doesn't work! Seems like
you can't have a calculation and a validation in the same cell....

So I was trying to write an IF formula that would trigger a msgbox
saying "the number of values entered is not correct" if B500 doesn't
equal C500.

Something like:
= if(B500=C500,"",msgboxmacro)

No luck. Dead as a doornail. Can somebody please help? Surely there's
a way to do this. I need SOME way to alert the user to the fact that
the number of values entered doesn't equal the number in C500.

Thanks. Please reply to the newsgroup.

Bill S.

--

Dave Peterson


Thanks, Dave. Yes, that's one way to do it: conditional formatting. So
if it's not equal to C500, it becomes bright red and boldface. Also,
the next cell, C500, uses an IF formula to say "ERROR!!!!" in bright
red/boldface as well. The main point is to be 100% reliable in
alerting the user to the error. Guess that'll work. Still, a msgbox
is better, because they have to look at it and click an "OK" button to
continue working. You can't "miss" it.

Thanks,
Bill S.


--

Dave Peterson


--

Dave Peterson
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
when a "check box" is checked, a "result" to be shown in another c Lisa Ann Kashner Excel Discussion (Misc queries) 2 November 6th 07 01:32 AM
Best way to trap error to MsgBox "Too many cell formats" [email protected] Excel Discussion (Misc queries) 0 August 22nd 06 09:52 PM
inputBox calculations and msgbox or "outputBox" CC Excel Worksheet Functions 0 July 14th 06 09:11 AM


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