ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,983
- Office Version
- 2007
- Platform
- Windows
On my sheet i have a database where when i make a selection from a drop down the cells are filled with values from a range & also an IF vlookup is used.
All works well until i wish to add to the database & code needs to be updated.
Code in use in cell C3
Now when i try to alter the code & paste it in my first cell i notice that when i leave the cell its removed thus cell being empty.
I code in use is shown below & ive tracked the issue down to the line in Red.
Who can it be written another way without my issue.
Thanks
Is this code just for changing the text to uppercase OR is it doing something else ?
All works well until i wish to add to the database & code needs to be updated.
Code in use in cell C3
VBA Code:
=IFERROR(IF(VLOOKUP($B18,$F:$H,3,FALSE)=0,"", VLOOKUP($B18,$F:$H,3,FALSE)),"")
Now when i try to alter the code & paste it in my first cell i notice that when i leave the cell its removed thus cell being empty.
I code in use is shown below & ive tracked the issue down to the line in Red.
Who can it be written another way without my issue.
Thanks
Rich (BB code):
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
If Intersect(Target, Range("A2:D29")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Target = UCase(Target)
Application.EnableEvents = True
End Sub
Is this code just for changing the text to uppercase OR is it doing something else ?