Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
AusTexRich
 
Posts: n/a
Default VB evaluate a value in a table's column and display msgbox

I've reviewed all of the questions and responses, but, didn't find anything
similar to what I needed. My table has one column which adds values,
positive and negative, from another column or a running total, if you will.
When a specific value, plus or minus, is reached I want a corresponding
message to display, i.e, when the value of the running total = 40 is one
message and when the running total <= -60 is the other. Can help?
--
AusTexRich
  #2   Report Post  
Duke Carey
 
Posts: n/a
Default

A little more info would facilitate a more concise response

Where do the numbers in the 'other' column come from? Is somebody entering
them manually?

"AusTexRich" wrote:

I've reviewed all of the questions and responses, but, didn't find anything
similar to what I needed. My table has one column which adds values,
positive and negative, from another column or a running total, if you will.
When a specific value, plus or minus, is reached I want a corresponding
message to display, i.e, when the value of the running total = 40 is one
message and when the running total <= -60 is the other. Can help?
--
AusTexRich

  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

A shot at what you might mean.

In B1,

=IF(SUM($B$1:B1)=40,"one message",IF(SUM($B$1:B1)<=-60,"another
message",""))

--
HTH

Bob Phillips

"AusTexRich" wrote in message
...
I've reviewed all of the questions and responses, but, didn't find

anything
similar to what I needed. My table has one column which adds values,
positive and negative, from another column or a running total, if you

will.
When a specific value, plus or minus, is reached I want a corresponding
message to display, i.e, when the value of the running total = 40 is one
message and when the running total <= -60 is the other. Can help?
--
AusTexRich



  #4   Report Post  
Loris
 
Posts: n/a
Default

You can certainly accomplish it with a nested IF statement along these lines:
ASSUME THE TOTAL OF COLUMN WITH YOUR VALUES IS IN CELL C1,
=IF(C1=40,"MAXIMUM EXCEEDED",IF(C1<=-60,"MINIMUM EXCEEDED",""))
See if this works for you.

"AusTexRich" wrote:

I've reviewed all of the questions and responses, but, didn't find anything
similar to what I needed. My table has one column which adds values,
positive and negative, from another column or a running total, if you will.
When a specific value, plus or minus, is reached I want a corresponding
message to display, i.e, when the value of the running total = 40 is one
message and when the running total <= -60 is the other. Can help?
--
AusTexRich

  #5   Report Post  
AusTexRich
 
Posts: n/a
Default

Sorry.
Column G looks up values from a table based on numbers entered in column D
and returns a plus or minus value (to col G). Column H sums that number plus
the number in the cell above in the same column (H), hence the running total.
A message should display based on the value at that time in col H.

Better?

--
AusTexRich


"Duke Carey" wrote:

A little more info would facilitate a more concise response

Where do the numbers in the 'other' column come from? Is somebody entering
them manually?

"AusTexRich" wrote:

I've reviewed all of the questions and responses, but, didn't find anything
similar to what I needed. My table has one column which adds values,
positive and negative, from another column or a running total, if you will.
When a specific value, plus or minus, is reached I want a corresponding
message to display, i.e, when the value of the running total = 40 is one
message and when the running total <= -60 is the other. Can help?
--
AusTexRich



  #6   Report Post  
AusTexRich
 
Posts: n/a
Default

For clarity here's the model

D - G - H
1
2
3 A 5 5
4 B 10 15
5 C 5 20
6 D 21 41 Message displayed when value = 40
7 E -102 -61 Message displayed when value <= -60

Column D is an number that's entered
Column G looks up the value for the number in Col D
Column H keeps the running total



AusTexRich


"Bob Phillips" wrote:

A shot at what you might mean.

In B1,

=IF(SUM($B$1:B1)=40,"one message",IF(SUM($B$1:B1)<=-60,"another
message",""))

--
HTH

Bob Phillips

"AusTexRich" wrote in message
...
I've reviewed all of the questions and responses, but, didn't find

anything
similar to what I needed. My table has one column which adds values,
positive and negative, from another column or a running total, if you

will.
When a specific value, plus or minus, is reached I want a corresponding
message to display, i.e, when the value of the running total = 40 is one
message and when the running total <= -60 is the other. Can help?
--
AusTexRich




  #7   Report Post  
Bob Phillips
 
Posts: n/a
Default

Change B to H in my example and put it in I1 down.

--
HTH

Bob Phillips

"AusTexRich" wrote in message
...
For clarity here's the model

D - G - H
1
2
3 A 5 5
4 B 10 15
5 C 5 20
6 D 21 41 Message displayed when value = 40
7 E -102 -61 Message displayed when value <= -60

Column D is an number that's entered
Column G looks up the value for the number in Col D
Column H keeps the running total



AusTexRich


"Bob Phillips" wrote:

A shot at what you might mean.

In B1,

=IF(SUM($B$1:B1)=40,"one message",IF(SUM($B$1:B1)<=-60,"another
message",""))

--
HTH

Bob Phillips

"AusTexRich" wrote in message
...
I've reviewed all of the questions and responses, but, didn't find

anything
similar to what I needed. My table has one column which adds values,
positive and negative, from another column or a running total, if you

will.
When a specific value, plus or minus, is reached I want a

corresponding
message to display, i.e, when the value of the running total = 40 is

one
message and when the running total <= -60 is the other. Can help?
--
AusTexRich






  #8   Report Post  
AusTexRich
 
Posts: n/a
Default

That'll work.

Many thanks
--
AusTexRich


"Loris" wrote:

You can certainly accomplish it with a nested IF statement along these lines:
ASSUME THE TOTAL OF COLUMN WITH YOUR VALUES IS IN CELL C1,
=IF(C1=40,"MAXIMUM EXCEEDED",IF(C1<=-60,"MINIMUM EXCEEDED",""))
See if this works for you.

"AusTexRich" wrote:

I've reviewed all of the questions and responses, but, didn't find anything
similar to what I needed. My table has one column which adds values,
positive and negative, from another column or a running total, if you will.
When a specific value, plus or minus, is reached I want a corresponding
message to display, i.e, when the value of the running total = 40 is one
message and when the running total <= -60 is the other. Can help?
--
AusTexRich

  #9   Report Post  
AusTexRich
 
Posts: n/a
Default

That'll work. I was trying to get a Vba message box, but, this is one way.
Thanks
--
AusTexRich


"AusTexRich" wrote:

For clarity here's the model

D - G - H
1
2
3 A 5 5
4 B 10 15
5 C 5 20
6 D 21 41 Message displayed when value = 40
7 E -102 -61 Message displayed when value <= -60

Column D is an number that's entered
Column G looks up the value for the number in Col D
Column H keeps the running total



AusTexRich


"Bob Phillips" wrote:

A shot at what you might mean.

In B1,

=IF(SUM($B$1:B1)=40,"one message",IF(SUM($B$1:B1)<=-60,"another
message",""))

--
HTH

Bob Phillips

"AusTexRich" wrote in message
...
I've reviewed all of the questions and responses, but, didn't find

anything
similar to what I needed. My table has one column which adds values,
positive and negative, from another column or a running total, if you

will.
When a specific value, plus or minus, is reached I want a corresponding
message to display, i.e, when the value of the running total = 40 is one
message and when the running total <= -60 is the other. Can help?
--
AusTexRich




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



All times are GMT +1. The time now is 11:05 AM.

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"