ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Help with a pop-up msg (https://www.excelbanter.com/excel-discussion-misc-queries/236555-help-pop-up-msg.html)

flds

Help with a pop-up msg
 
I need some help in Excel for a macro.

A1 Column Heading
A2 Negative value (-2)
A3 Sub total (-2) (Cell locked with formula)
A4 I have a positive value (6)
A5 Sub total (4) (Cell locked with formula)
A6 I have a positive value (10)
A7 Sub total (14) (Cell locked with formula)
A8 Empty (waiting for value)

In A8 when I enter a value 1, I need a pop-up message "THIRD WEEK"
only if A4 and A6 is with positive values. If either A4 or A6 has a
negative value the message should not pop-up.

(if possible the message to read "THIRD WEEK + the heading of the
column" would be prefered)

The chart has a range of A4:F313. The pop-up msg could pop anywhere
within the range, if the above scenario occurs.

I hope I am clear in the above explanation
Your help in creating a macro would be appreciated.

Thanks

FLDS


Don Guillett

Help with a pop-up msg
 
This works for your example. It is not clear if you want it to work for all
columns???

Right click sheet tabview codeinsert this.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < Range("a8").Address Then Exit Sub
If Target 0 And Range("a4") 0 And Range("a6") 0 Then
MsgBox "Third week " & Range("a1")
End If
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"flds" wrote in message
...
I need some help in Excel for a macro.

A1 Column Heading
A2 Negative value (-2)
A3 Sub total (-2) (Cell locked with formula)
A4 I have a positive value (6)
A5 Sub total (4) (Cell locked with formula)
A6 I have a positive value (10)
A7 Sub total (14) (Cell locked with formula)
A8 Empty (waiting for value)

In A8 when I enter a value 1, I need a pop-up message "THIRD WEEK"
only if A4 and A6 is with positive values. If either A4 or A6 has a
negative value the message should not pop-up.

(if possible the message to read "THIRD WEEK + the heading of the
column" would be prefered)

The chart has a range of A4:F313. The pop-up msg could pop anywhere
within the range, if the above scenario occurs.

I hope I am clear in the above explanation
Your help in creating a macro would be appreciated.

Thanks

FLDS



flds

Help with a pop-up msg
 
On Jul 11, 9:21*am, "Don Guillett" wrote:
This works for your example. It is not clear if you want it to work for all
columns???

Right click sheet tabview codeinsert this.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < Range("a8").Address Then Exit Sub
If Target 0 And Range("a4") 0 And Range("a6") 0 Then
MsgBox "Third week " & Range("a1")
End If
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"flds" wrote in message

...



I need some help in Excel for a macro.


A1 Column Heading
A2 Negative value (-2)
A3 Sub total (-2) (Cell locked with formula)
A4 I have a positive value (6)
A5 Sub total (4) (Cell locked with formula)
A6 I have a positive value (10)
A7 Sub total (14) (Cell locked with formula)
A8 Empty (waiting for value)


In A8 when I enter a value 1, I need a pop-up message "THIRD WEEK"
only if A4 and A6 is with positive values. If either A4 or A6 has a
negative value the message should not pop-up.


(if possible the message to read "THIRD WEEK + the heading of the
column" would be prefered)


The chart has a range of A4:F313. The pop-up msg could pop anywhere
within the range, if the above scenario occurs.


I hope I am clear in the above explanation
Your help in creating a macro would be appreciated.


Thanks


FLDS- Hide quoted text -


- Show quoted text -





Hi Don,

Thanks for your reply and code.

Yes I want this to work for all columns, I have mentioned the range
and this can occur any where within the range (The chart has a range
of A4:F313).

I would appreciate if this will work for me.

Thanks once again.

FLDS

Don Guillett

Help with a pop-up msg
 
I prefer TOP posting so when replying to me post at the TOP.
I'm still not positive of what you want since you mention a lot of rows but
this works for row 8 for columns a:f. If not, send your file to me with a
clear explanation.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("a8:f8")) Is Nothing Then Exit Sub
If Target 0 And Target.Offset(-4) 0 And Target.Offset(-2) 0 Then
MsgBox "Third week " & Target.Offset(-7)
End If
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"flds" wrote in message
...
On Jul 11, 9:21 am, "Don Guillett" wrote:
This works for your example. It is not clear if you want it to work for
all
columns???

Right click sheet tabview codeinsert this.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < Range("a8").Address Then Exit Sub
If Target 0 And Range("a4") 0 And Range("a6") 0 Then
MsgBox "Third week " & Range("a1")
End If
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"flds" wrote in message

...



I need some help in Excel for a macro.


A1 Column Heading
A2 Negative value (-2)
A3 Sub total (-2) (Cell locked with formula)
A4 I have a positive value (6)
A5 Sub total (4) (Cell locked with formula)
A6 I have a positive value (10)
A7 Sub total (14) (Cell locked with formula)
A8 Empty (waiting for value)


In A8 when I enter a value 1, I need a pop-up message "THIRD WEEK"
only if A4 and A6 is with positive values. If either A4 or A6 has a
negative value the message should not pop-up.


(if possible the message to read "THIRD WEEK + the heading of the
column" would be prefered)


The chart has a range of A4:F313. The pop-up msg could pop anywhere
within the range, if the above scenario occurs.


I hope I am clear in the above explanation
Your help in creating a macro would be appreciated.


Thanks


FLDS- Hide quoted text -


- Show quoted text -





Hi Don,

Thanks for your reply and code.

Yes I want this to work for all columns, I have mentioned the range
and this can occur any where within the range (The chart has a range
of A4:F313).

I would appreciate if this will work for me.

Thanks once again.

FLDS


flds

Help with a pop-up msg
 
On Jul 11, 4:12*pm, "Don Guillett" wrote:
I prefer TOP posting so when replying to me post at the TOP.
I'm still not positive of what you want since you mention a lot of rows but
this works for row 8 for columns a:f. If not, send your file to me with a
clear explanation.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("a8:f8")) Is Nothing Then Exit Sub
If Target 0 And Target.Offset(-4) 0 And Target.Offset(-2) 0 Then
MsgBox "Third week " & Target.Offset(-7)
End If
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"flds" wrote in message

...
On Jul 11, 9:21 am, "Don Guillett" wrote:





This works for your example. It is not clear if you want it to work for
all
columns???


Right click sheet tabview codeinsert this.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < Range("a8").Address Then Exit Sub
If Target 0 And Range("a4") 0 And Range("a6") 0 Then
MsgBox "Third week " & Range("a1")
End If
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"flds" wrote in message


....


I need some help in Excel for a macro.


A1 Column Heading
A2 Negative value (-2)
A3 Sub total (-2) (Cell locked with formula)
A4 I have a positive value (6)
A5 Sub total (4) (Cell locked with formula)
A6 I have a positive value (10)
A7 Sub total (14) (Cell locked with formula)
A8 Empty (waiting for value)


In A8 when I enter a value 1, I need a pop-up message "THIRD WEEK"
only if A4 and A6 is with positive values. If either A4 or A6 has a
negative value the message should not pop-up.


(if possible the message to read "THIRD WEEK + the heading of the
column" would be prefered)


The chart has a range of A4:F313. The pop-up msg could pop anywhere
within the range, if the above scenario occurs.


I hope I am clear in the above explanation
Your help in creating a macro would be appreciated.


Thanks


FLDS- Hide quoted text -


- Show quoted text -


Hi Don,

Thanks for your reply and code.

Yes I want this to work for all columns, I have mentioned the range
and this can occur any where within the range (The chart has a range
of A4:F313).

I would appreciate if this will work for me.

Thanks once again.

FLDS- Hide quoted text -

- Show quoted text -




Thanks Don

The only problem is the heading. It should not be offset (-7)

It is constantly the same column on row 3

FLDS


Don Guillett

Help with a pop-up msg
 
If not, send your file to me with a
clear explanation.



--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"flds" wrote in message
...
On Jul 11, 4:12 pm, "Don Guillett" wrote:
I prefer TOP posting so when replying to me post at the TOP.
I'm still not positive of what you want since you mention a lot of rows
but
this works for row 8 for columns a:f. If not, send your file to me with a
clear explanation.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("a8:f8")) Is Nothing Then Exit Sub
If Target 0 And Target.Offset(-4) 0 And Target.Offset(-2) 0 Then
MsgBox "Third week " & Target.Offset(-7)
End If
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"flds" wrote in message

...
On Jul 11, 9:21 am, "Don Guillett" wrote:





This works for your example. It is not clear if you want it to work for
all
columns???


Right click sheet tabview codeinsert this.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < Range("a8").Address Then Exit Sub
If Target 0 And Range("a4") 0 And Range("a6") 0 Then
MsgBox "Third week " & Range("a1")
End If
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"flds" wrote in message


...


I need some help in Excel for a macro.


A1 Column Heading
A2 Negative value (-2)
A3 Sub total (-2) (Cell locked with formula)
A4 I have a positive value (6)
A5 Sub total (4) (Cell locked with formula)
A6 I have a positive value (10)
A7 Sub total (14) (Cell locked with formula)
A8 Empty (waiting for value)


In A8 when I enter a value 1, I need a pop-up message "THIRD WEEK"
only if A4 and A6 is with positive values. If either A4 or A6 has a
negative value the message should not pop-up.


(if possible the message to read "THIRD WEEK + the heading of the
column" would be prefered)


The chart has a range of A4:F313. The pop-up msg could pop anywhere
within the range, if the above scenario occurs.


I hope I am clear in the above explanation
Your help in creating a macro would be appreciated.


Thanks


FLDS- Hide quoted text -


- Show quoted text -


Hi Don,

Thanks for your reply and code.

Yes I want this to work for all columns, I have mentioned the range
and this can occur any where within the range (The chart has a range
of A4:F313).

I would appreciate if this will work for me.

Thanks once again.

FLDS- Hide quoted text -

- Show quoted text -




Thanks Don

The only problem is the heading. It should not be offset (-7)

It is constantly the same column on row 3

FLDS



All times are GMT +1. The time now is 02:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com