#1   Report Post  
AK
 
Posts: n/a
Default Pop Up Message

Based on the entry in a cell in a column (B), how would a message box appear
based on the entry.

Example:
If B2 = "NY", message box would appear, "Talk to John"
or if B5000 = "NY" same message would appear

Message box should appear for "NY" in the column and not a specific cell.

Thank you in advance
  #2   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

AK,

An easy way is to put this in a cell:

=IF(OR(B2:B65536="NY"),"Talk to Bob", "")

Enter as an array formula (Use Ctrl - Shift - Enter, not just Enter).

It's best put at the top of the worksheet in the freeze pane area, if you
have one, so it doesn't get scrolled off the screen.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"AK" wrote in message
...
Based on the entry in a cell in a column (B), how would a message box
appear
based on the entry.

Example:
If B2 = "NY", message box would appear, "Talk to John"
or if B5000 = "NY" same message would appear

Message box should appear for "NY" in the column and not a specific cell.

Thank you in advance



  #3   Report Post  
Jim May
 
Posts: n/a
Default

Neat function Earl -- what with the OR() and a single argument...
How so?

"Earl Kiosterud" wrote in message
...
AK,

An easy way is to put this in a cell:

=IF(OR(B2:B65536="NY"),"Talk to Bob", "")

Enter as an array formula (Use Ctrl - Shift - Enter, not just Enter).

It's best put at the top of the worksheet in the freeze pane area, if you
have one, so it doesn't get scrolled off the screen.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"AK" wrote in message
...
Based on the entry in a cell in a column (B), how would a message box
appear
based on the entry.

Example:
If B2 = "NY", message box would appear, "Talk to John"
or if B5000 = "NY" same message would appear

Message box should appear for "NY" in the column and not a specific

cell.

Thank you in advance





  #4   Report Post  
AK
 
Posts: n/a
Default

Thanks Earl

However I need to know the VBA code for the MsgBox... The "helper" column
equation is not the best way in this instance to handle this. Do you know
the code to have a Message Box appear based on the "NY" in any cell in a
particular column?

Thanks,

"Earl Kiosterud" wrote:

AK,

An easy way is to put this in a cell:

=IF(OR(B2:B65536="NY"),"Talk to Bob", "")

Enter as an array formula (Use Ctrl - Shift - Enter, not just Enter).

It's best put at the top of the worksheet in the freeze pane area, if you
have one, so it doesn't get scrolled off the screen.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"AK" wrote in message
...
Based on the entry in a cell in a column (B), how would a message box
appear
based on the entry.

Example:
If B2 = "NY", message box would appear, "Talk to John"
or if B5000 = "NY" same message would appear

Message box should appear for "NY" in the column and not a specific cell.

Thank you in advance




  #5   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

Jim,

The OR is necessary to reduce the results of looking at B2:B65536="NY" to a
single TRUE (at least one was TRUE), or FALSE (all were FALSE). If we
wrote:

=IF(B2:B65536 = "NY", ...

it would want to give us an array of answers, for each of B2 through B65536.
Array formulas can give an array for a result. In this case, we'd see only
the results of the first one (B2). By reducing them all to one TRUE or
FALSE with the OR, we don't get an array for an answer -- we get one TRUE or
FALSE.

That's my story but I might not stick to it.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"Jim May" wrote in message
news:i2CXd.57526$%U2.25620@lakeread01...
Neat function Earl -- what with the OR() and a single argument...
How so?

"Earl Kiosterud" wrote in message
...
AK,

An easy way is to put this in a cell:

=IF(OR(B2:B65536="NY"),"Talk to Bob", "")

Enter as an array formula (Use Ctrl - Shift - Enter, not just Enter).

It's best put at the top of the worksheet in the freeze pane area, if you
have one, so it doesn't get scrolled off the screen.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"AK" wrote in message
...
Based on the entry in a cell in a column (B), how would a message box
appear
based on the entry.

Example:
If B2 = "NY", message box would appear, "Talk to John"
or if B5000 = "NY" same message would appear

Message box should appear for "NY" in the column and not a specific

cell.

Thank you in advance









  #6   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

AK,

If a message box is to be posted, when should that happen? On the first
occurence of NY in the column? Or can more than one NY appear, and as long
as there's one there, "Talk to John" should show? You need to describe the
conditions, and when they happen, or we'll be guessing at stuff.
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"AK" wrote in message
...
Thanks Earl

However I need to know the VBA code for the MsgBox... The "helper" column
equation is not the best way in this instance to handle this. Do you know
the code to have a Message Box appear based on the "NY" in any cell in a
particular column?

Thanks,

"Earl Kiosterud" wrote:

AK,

An easy way is to put this in a cell:

=IF(OR(B2:B65536="NY"),"Talk to Bob", "")

Enter as an array formula (Use Ctrl - Shift - Enter, not just Enter).

It's best put at the top of the worksheet in the freeze pane area, if you
have one, so it doesn't get scrolled off the screen.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"AK" wrote in message
...
Based on the entry in a cell in a column (B), how would a message box
appear
based on the entry.

Example:
If B2 = "NY", message box would appear, "Talk to John"
or if B5000 = "NY" same message would appear

Message box should appear for "NY" in the column and not a specific
cell.

Thank you in advance






  #7   Report Post  
Jim May
 
Posts: n/a
Default

Earl,
Thanks, - this is ground-breaking stuff. Your use of the Or() function
reminds me of the things we usually see Harland Grove come up with.
Appreciate your response and explanation.
Jim May

"Earl Kiosterud" wrote in message
...
Jim,

The OR is necessary to reduce the results of looking at B2:B65536="NY" to

a
single TRUE (at least one was TRUE), or FALSE (all were FALSE). If we
wrote:

=IF(B2:B65536 = "NY", ...

it would want to give us an array of answers, for each of B2 through

B65536.
Array formulas can give an array for a result. In this case, we'd see

only
the results of the first one (B2). By reducing them all to one TRUE or
FALSE with the OR, we don't get an array for an answer -- we get one TRUE

or
FALSE.

That's my story but I might not stick to it.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"Jim May" wrote in message
news:i2CXd.57526$%U2.25620@lakeread01...
Neat function Earl -- what with the OR() and a single argument...
How so?

"Earl Kiosterud" wrote in message
...
AK,

An easy way is to put this in a cell:

=IF(OR(B2:B65536="NY"),"Talk to Bob", "")

Enter as an array formula (Use Ctrl - Shift - Enter, not just Enter).

It's best put at the top of the worksheet in the freeze pane area, if

you
have one, so it doesn't get scrolled off the screen.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"AK" wrote in message
...
Based on the entry in a cell in a column (B), how would a message box
appear
based on the entry.

Example:
If B2 = "NY", message box would appear, "Talk to John"
or if B5000 = "NY" same message would appear

Message box should appear for "NY" in the column and not a specific

cell.

Thank you in advance








  #8   Report Post  
AK
 
Posts: n/a
Default

Earl,

The message box should appear anytime "NY" is typed into any cell in a
particular column.

Hope that helps and thanks for the help

AK

"Earl Kiosterud" wrote:

AK,

If a message box is to be posted, when should that happen? On the first
occurence of NY in the column? Or can more than one NY appear, and as long
as there's one there, "Talk to John" should show? You need to describe the
conditions, and when they happen, or we'll be guessing at stuff.
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"AK" wrote in message
...
Thanks Earl

However I need to know the VBA code for the MsgBox... The "helper" column
equation is not the best way in this instance to handle this. Do you know
the code to have a Message Box appear based on the "NY" in any cell in a
particular column?

Thanks,

"Earl Kiosterud" wrote:

AK,

An easy way is to put this in a cell:

=IF(OR(B2:B65536="NY"),"Talk to Bob", "")

Enter as an array formula (Use Ctrl - Shift - Enter, not just Enter).

It's best put at the top of the worksheet in the freeze pane area, if you
have one, so it doesn't get scrolled off the screen.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"AK" wrote in message
...
Based on the entry in a cell in a column (B), how would a message box
appear
based on the entry.

Example:
If B2 = "NY", message box would appear, "Talk to John"
or if B5000 = "NY" same message would appear

Message box should appear for "NY" in the column and not a specific
cell.

Thank you in advance






  #9   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

Jim,

I forgot to mention: As I said, without the OR, the array formula wants to
give us an array for a result. The way you'd have to get that array result
is to have entered the formula into multiple contiguous cells, then do the
Ctrl - Shift - Enter. Array in -- array out. When you use something like
SUM, or OR, or anything that takes the array and produces one result, you
need only one array formula. Array in -- one value out.
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"Jim May" wrote in message
news:KOWXd.57795$%U2.20084@lakeread01...
Earl,
Thanks, - this is ground-breaking stuff. Your use of the Or() function
reminds me of the things we usually see Harland Grove come up with.
Appreciate your response and explanation.
Jim May

"Earl Kiosterud" wrote in message
...
Jim,

The OR is necessary to reduce the results of looking at B2:B65536="NY" to

a
single TRUE (at least one was TRUE), or FALSE (all were FALSE). If we
wrote:

=IF(B2:B65536 = "NY", ...

it would want to give us an array of answers, for each of B2 through

B65536.
Array formulas can give an array for a result. In this case, we'd see

only
the results of the first one (B2). By reducing them all to one TRUE or
FALSE with the OR, we don't get an array for an answer -- we get one TRUE

or
FALSE.

That's my story but I might not stick to it.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"Jim May" wrote in message
news:i2CXd.57526$%U2.25620@lakeread01...
Neat function Earl -- what with the OR() and a single argument...
How so?

"Earl Kiosterud" wrote in message
...
AK,

An easy way is to put this in a cell:

=IF(OR(B2:B65536="NY"),"Talk to Bob", "")

Enter as an array formula (Use Ctrl - Shift - Enter, not just Enter).

It's best put at the top of the worksheet in the freeze pane area, if

you
have one, so it doesn't get scrolled off the screen.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"AK" wrote in message
...
Based on the entry in a cell in a column (B), how would a message
box
appear
based on the entry.

Example:
If B2 = "NY", message box would appear, "Talk to John"
or if B5000 = "NY" same message would appear

Message box should appear for "NY" in the column and not a specific
cell.

Thank you in advance










  #10   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

AK,

This is an event-fired sub. PUt it in the Sheet module:

Private Sub Worksheet_Change(ByVal Target As Range)
Const NYColumn = 6
If Target.Column = NYColumn And Target.Value = "NY" Then
MsgBox "Talk to John"
End If
End Sub

Change NYColumn to match the actual column you want it to monitor.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"AK" wrote in message
...
Earl,

The message box should appear anytime "NY" is typed into any cell in a
particular column.

Hope that helps and thanks for the help

AK

"Earl Kiosterud" wrote:

AK,

If a message box is to be posted, when should that happen? On the first
occurence of NY in the column? Or can more than one NY appear, and as
long
as there's one there, "Talk to John" should show? You need to describe
the
conditions, and when they happen, or we'll be guessing at stuff.
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"AK" wrote in message
...
Thanks Earl

However I need to know the VBA code for the MsgBox... The "helper"
column
equation is not the best way in this instance to handle this. Do you
know
the code to have a Message Box appear based on the "NY" in any cell in
a
particular column?

Thanks,

"Earl Kiosterud" wrote:

AK,

An easy way is to put this in a cell:

=IF(OR(B2:B65536="NY"),"Talk to Bob", "")

Enter as an array formula (Use Ctrl - Shift - Enter, not just Enter).

It's best put at the top of the worksheet in the freeze pane area, if
you
have one, so it doesn't get scrolled off the screen.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"AK" wrote in message
...
Based on the entry in a cell in a column (B), how would a message
box
appear
based on the entry.

Example:
If B2 = "NY", message box would appear, "Talk to John"
or if B5000 = "NY" same message would appear

Message box should appear for "NY" in the column and not a specific
cell.

Thank you in advance








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
Excel Error Message Mark Excel Worksheet Functions 3 June 1st 05 02:41 PM
when opening excel I receive a message that says file can't be fo. Ken Excel Discussion (Misc queries) 3 February 22nd 05 12:13 AM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM
Pivot Table not valid error message when formatting data 'button'. MDW Excel Discussion (Misc queries) 0 January 27th 05 03:01 PM
Error message opening Excel97 workbook cobbler Excel Discussion (Misc queries) 2 December 11th 04 05:31 PM


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

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

About Us

"It's about Microsoft Excel"