Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|