Wishful Thinking
New Member
- Joined
- Dec 31, 2023
- Messages
- 6
- Office Version
- 365
- Platform
- Windows
Kudos to Skyybot for providing an answer to my previous question "pop up msgbox dependant on specific text entered into userform combobox" as shown below in red and here is a - Link to previous post with more info.
I have a few additional questions:
1: I found another entry for column 2 that I want to pop up a different msgbox. How would I go about adding other changes in the B2:B1000 range by keyword and popping up a different msgbox. This would include multiple keywords. I may find a few others so I'll want to create multiple changes based on multiple keywords if possible.
2: How would I add to column 11 (M,N,O,P are merged cells that I use to reference what the payment was for). It would include multiple keywords (example: "Credit Card") and I don't want it to pop up a msgbox, I would rather it input into range M2:M1000 (I assume since it is the first cell of 4 merged cells) that would input something like "Gas", "Food", "House", etc.
3: And (yeah, getting greedy now), column 6 (my "Paid To") put in a fixed dollar amount into column 5 (my "Amount"). I have a few accounts (example: electricity is balanced budget and is the same cost per month) do I'd want the "Amount" column to reflect the fixed payment amount.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Target.Column = 2 Then Exit Sub
If Not Range("B2:B1000").Find(What:="License", LookIn:=xlValues, LookAt:=xlWhole, MatchCase:=True) Is Nothing Then
MsgBox "Two entries needed, one for tag payment and one for taxes."
End If
End Sub
Thanks
I have a few additional questions:
1: I found another entry for column 2 that I want to pop up a different msgbox. How would I go about adding other changes in the B2:B1000 range by keyword and popping up a different msgbox. This would include multiple keywords. I may find a few others so I'll want to create multiple changes based on multiple keywords if possible.
2: How would I add to column 11 (M,N,O,P are merged cells that I use to reference what the payment was for). It would include multiple keywords (example: "Credit Card") and I don't want it to pop up a msgbox, I would rather it input into range M2:M1000 (I assume since it is the first cell of 4 merged cells) that would input something like "Gas", "Food", "House", etc.
3: And (yeah, getting greedy now), column 6 (my "Paid To") put in a fixed dollar amount into column 5 (my "Amount"). I have a few accounts (example: electricity is balanced budget and is the same cost per month) do I'd want the "Amount" column to reflect the fixed payment amount.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Target.Column = 2 Then Exit Sub
If Not Range("B2:B1000").Find(What:="License", LookIn:=xlValues, LookAt:=xlWhole, MatchCase:=True) Is Nothing Then
MsgBox "Two entries needed, one for tag payment and one for taxes."
End If
End Sub
Thanks