melewie
Board Regular
- Joined
- Nov 21, 2008
- Messages
- 188
- Office Version
- 365
- Platform
- Windows
Hi All, 
I have been handed some work but am having some trouble with it, I need to do some data validation on a cell (A FRIGGIN MERGED CELL!) the user needs to complete a form (not a userform, created on a sheet with many merged cells) the problem I'm having is I need to check the value of cell C7 (C7:E7) against a range called line_RNG before the user can submit the form. The way I would normally go is
However this doesn't seem to work and LineTest always remains 'nothing', either i'm missing something or could this be due to the cells being merged?? it does pick up the value of the cell but linetest remains 'nothing' any help is hugely appreciated
P.S I cannot change the layout of the form/I don't want to create a huge amount of work.
Thanks
Lew

I have been handed some work but am having some trouble with it, I need to do some data validation on a cell (A FRIGGIN MERGED CELL!) the user needs to complete a form (not a userform, created on a sheet with many merged cells) the problem I'm having is I need to check the value of cell C7 (C7:E7) against a range called line_RNG before the user can submit the form. The way I would normally go is
Code:
Dim LineTest As Range
On Error Resume Next
Set LineTest = Range("Line_RNG").Find(What:=range("c7".value), LookAt:=xlWhole)
On Error GoTo 0
If LineTest Is Nothing Then
MsgBox "you're a mug do it properly"
GoTo lastline
End If
However this doesn't seem to work and LineTest always remains 'nothing', either i'm missing something or could this be due to the cells being merged?? it does pick up the value of the cell but linetest remains 'nothing' any help is hugely appreciated
P.S I cannot change the layout of the form/I don't want to create a huge amount of work.
Thanks
Lew