Thread: [Solved] HLOOKUP, if,? OR MACRO
View Single Post
 
Old 04-19-2011, 02:06 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,481
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Bobby,

Change:
'Check column AG for X-Ray dates
If .Cells(j, 33).Value Like "*#/*#/####" Then iXRay = iXRay + 1
to:
'Check column AG & AL for X-Ray dates
If .Range("AG" & j).Value Like "*#/*#/####" Or _
.Range("AL" & j).Value Like "*#/*#/####" Then iXRay = iXRay + 1

There's nothing significant about using .Range instead of .Cells here except that it makes it easier to recognise which column the code is working with.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote