IF formula in Excel

Closed
jonev Posts 1 Registration date Thursday February 22, 2018 Status Member Last seen February 22, 2018 - Updated on Feb 23, 2018 at 11:25 AM
 Blocked Profile - 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

1 response

Blocked Profile
Feb 23, 2018 at 04:50 PM
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:
https://ccm.net/faq/54862-how-to-copy-data-from-one-excel-sheet-to-another-using-a-formula

It can be done.
0