View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
libby libby is offline
external usenet poster
 
Posts: 96
Default merged cells problem

Hi folks,

Ok this is the problem
In column A cells 1 to 5 are merged and display a single
word which was originally in cell A1 but is now centered
vertically.
in column D cells 1 to 5 is a list of names. I need excel
to find the name and then display the word in Label1

So far I've used the find method successfully to locate
the name but have come unstuck on the next bit.

'Myname = the found name's address

label1.caption = range(Myname).end(xlToLeft).text
'(ie label1 displays range A 1-5 which ever correpsonds to
the found cell.

This works, but because range A1-5 is merged, the word is
only in range A1 so label1 displays nothing