wrapping text and vlookup

G

Guest

Hi

Bit of a strange one this, I have a vlookup formula that returns long text
strings. I'd like to have the cells wrap the text when necessary, however
excel won't apparently allow this to happen - with the wrap text box checked
the text doesn't wrap. Does anyone know if this is a result of the use of the
vlookup, and is there any way around it?

Thanks
 
D

Dave Peterson

You sure that the text isn't wrapping?

Could it be that the rowheight isn't expanding?

If you adjust the rowheight manually, do you see your wrapped text?
 
D

Dave Peterson

Rowheight won't change as a result of a calculation. You'll either have to
manually adjust that rowheight or maybe have an event macro do it for you.

If you want to try that event macro, you can rightclick on the worksheet tab
that should have this behavior. Select view code and paste this in:

Option Explicit
Private Sub Worksheet_Calculate()
Me.Rows.AutoFit
End Sub


You could be more explicit, too, by using a line like:

Me.Rows("1:15").AutoFit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top