Also - if you use the macro - you should change the For Each line to
For Each x In Intersect(Selection, Selection.Parent.UsedRange)
that way - it doesn't waste time looping through cells that are not used
anyway.
"KHashmi316" wrote:
JMB Wrote:
when you paste the code into a module, make sure this line appears on
one
line. when i posted it got wrapped to the next line (and it's not
supposed
to be).
If (UCase(Left(x.Value, InStr(1, x.Value, " ", vbTextCompare) - 1)) =
UCase(y)) _
Thx for helping out.
I tried to run this but keep running into 'Variable not defined' error
for "x" in this line:
For Each x In Selection
Any clues?
--
KHashmi316
------------------------------------------------------------------------
KHashmi316's Profile: http://www.excelforum.com/member.php...o&userid=10439
View this thread: http://www.excelforum.com/showthread...hreadid=378854