IF formula in Excel

jonev 1 Posts Thursday February 22, 2018Registration date February 22, 2018 Last seen - Feb 22, 2018 at 10:46 PM - Latest reply: ac3mark 10260 Posts Monday June 3, 2013Registration dateModeratorStatus August 15, 2018 Last seen
- Feb 23, 2018 at 04:50 PM
I have this in excel as a VBA , however it wont work unless the field is manually keyed , ideally I want a drop box with Yes , No , Unsure . can this be done ? or does the cell have to be a text ? I am just learning with these so need a hand..Thanks Jo

Private Sub Worksheet_Change_A(ByVal Target As Range)
'Update: 2017/7/25
Dim xCell As Range, Rg As Range
On Error Resume Next
Set Rg = Application.Intersect(Target, Range("D19"))
If Not Rg Is Nothing Then
For Each xCell In Rg
If xCell.Value = "YES" Then
MsgBox "If yes enter credit note # to Cell G19", vbInformation, "Kutools for Excel"
Exit Sub
End If
Next
End If
End Sub
See more 

Your reply

1 reply

ac3mark 10260 Posts Monday June 3, 2013Registration dateModeratorStatus August 15, 2018 Last seen - Feb 23, 2018 at 04:50 PM
0
Thank you
Drop down boxes placed onto a spreadsheet does not function well. It will not move with the cells, and is cumbersome to deploy.


Now, what you can do, is make a dialog box, that will place a selection value into the ACTIVE CELL. So, lets say, you select the cell you want to place the YES/NO/MAYBE, and hit CNTRL-ALT-Q (as an example). Then that key combo will provide a dialog to select. Once you make the selection, it places the selection into the cell that was clicked (and made active) prior to the key-stroke.

Take a look at this and see if making a dialog box would work:
http://ccm.net/faq/54862-how-to-copy-data-from-one-excel-sheet-to-another-using-a-formula

It can be done.
Respond to ac3mark