If Cell Contains value from data validation list - VBA

mhasham

Board Regular
Joined
Feb 28, 2013
Messages
63
Hello,

I have the following code that checks to see if a cell is blank or 0 and if it meets this criteria it bumbs user to another cell..... I am wondering if there is a way to keep the logic of this code and add in a parameter that says:

IF cell H66 = -25
THEN cell H68 = -25
AND IF cell H66 = is anything other THAN -25 DO NOTHING

- formula has to take into consideration that user can select -25 and then go back in and change response in data validation list (cell H66)


Code:
Set Target = Target.Cells(1, 1)
If Not Intersect(Target, Range("H66")) Is Nothing Then
    If Range("H37").Value = 0 Then
        Range("H67").Select
    End If
End If

Thanks
 

Some videos you may like

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Watch MrExcel Video

Forum statistics

Threads
1,109,518
Messages
5,529,309
Members
409,862
Latest member
lbisacca
Top