Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
dk dk is offline
external usenet poster
 
Posts: 129
Default VLOOKUP and Wrap Text

Hi,

Im using a VLOOKUP to display text in different worksheets in the same
workbook.

The trouble Im having is getting the data to display exactly as it does in
the reference worksheet.

Single cells with a single line of text show correctly, however, if the text
in the single cell is greater than one line or contains bulleted lines, then
the returns in the other worksheets either show a line of hash symbols
(##########) or just the first line of text.

I have used a General format for all the cells on all the worksheets and the
€˜Wrap Text checkbox is ticked. I would therefore expect the row height of
the cells that contain the VLOOKUP formula to change so it displays all the
reference data but it doesnt.

Will I have to preset the row heights on the other worksheets so that the
data displays correctly?

Im using Excel 2k3

DK
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default VLOOKUP and Wrap Text

The only time I've seen those ###### symbols with text values is when I have the
cell formatted as Text and the length of the text is between 256 and 1024
characters.

Did you convert your formulas to values and then format the cell as text? If
you did, try formatting those offending cells as General.

As for the rowheight stuff, excel won't change the rowheight based on the
results of a formula.

But you could use an event macro to do it for you:

If you want to try, right click on the worksheet that should have this
behavior. Select View code. Paste this into the code window:

Option Explicit
Private Sub Worksheet_Calculate()
application.enableevents = false
Me.Rows.AutoFit
'or be specific
Me.Rows("1:33").AutoFit
application.enableevents = true
End Sub

Changing the rowheight in some versions of excel (xl2003+, IIRC) will cause the
excel to want to recalc again. The .enableevents stuff stops excel from going
into a loop--recalc, loop, recalc, loop, ....

DK wrote:

Hi,

Im using a VLOOKUP to display text in different worksheets in the same
workbook.

The trouble Im having is getting the data to display exactly as it does in
the reference worksheet.

Single cells with a single line of text show correctly, however, if the text
in the single cell is greater than one line or contains bulleted lines, then
the returns in the other worksheets either show a line of hash symbols
(##########) or just the first line of text.

I have used a General format for all the cells on all the worksheets and the
€˜Wrap Text checkbox is ticked. I would therefore expect the row height of
the cells that contain the VLOOKUP formula to change so it displays all the
reference data but it doesnt.

Will I have to preset the row heights on the other worksheets so that the
data displays correctly?

Im using Excel 2k3

DK


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
dk dk is offline
external usenet poster
 
Posts: 129
Default VLOOKUP and Wrap Text

Dave,

Thanks for your help and prompt reply, I used the General format to get rid
of the hash symbols, but unfortunately the event macro doesn't quite fit the
bill so I'll just have to settle for predetermined row heights for now.

The macro condenses the row height to a single line rather than increase it
to fit the text. Kinda back to square one but never mind.

DK

"Dave Peterson" wrote:

The only time I've seen those ###### symbols with text values is when I have the
cell formatted as Text and the length of the text is between 256 and 1024
characters.

Did you convert your formulas to values and then format the cell as text? If
you did, try formatting those offending cells as General.

As for the rowheight stuff, excel won't change the rowheight based on the
results of a formula.

But you could use an event macro to do it for you:

If you want to try, right click on the worksheet that should have this
behavior. Select View code. Paste this into the code window:

Option Explicit
Private Sub Worksheet_Calculate()
application.enableevents = false
Me.Rows.AutoFit
'or be specific
Me.Rows("1:33").AutoFit
application.enableevents = true
End Sub

Changing the rowheight in some versions of excel (xl2003+, IIRC) will cause the
excel to want to recalc again. The .enableevents stuff stops excel from going
into a loop--recalc, loop, recalc, loop, ....

DK wrote:

Hi,

I'm using a VLOOKUP to display text in different worksheets in the same
workbook.

The trouble I'm having is getting the data to display exactly as it does in
the reference worksheet.

Single cells with a single line of text show correctly, however, if the text
in the single cell is greater than one line or contains bulleted lines, then
the returns in the other worksheets either show a line of hash symbols
(##########) or just the first line of text.

I have used a General format for all the cells on all the worksheets and the
'Wrap Text' checkbox is ticked. I would therefore expect the row height of
the cells that contain the VLOOKUP formula to change so it displays all the
reference data but it doesn't.

Will I have to preset the row heights on the other worksheets so that the
data displays correctly?

I'm using Excel 2k3

DK


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default VLOOKUP and Wrap Text

The macro will work if you're not using merged cells.

DK wrote:

Dave,

Thanks for your help and prompt reply, I used the General format to get rid
of the hash symbols, but unfortunately the event macro doesn't quite fit the
bill so I'll just have to settle for predetermined row heights for now.

The macro condenses the row height to a single line rather than increase it
to fit the text. Kinda back to square one but never mind.

DK

"Dave Peterson" wrote:

The only time I've seen those ###### symbols with text values is when I have the
cell formatted as Text and the length of the text is between 256 and 1024
characters.

Did you convert your formulas to values and then format the cell as text? If
you did, try formatting those offending cells as General.

As for the rowheight stuff, excel won't change the rowheight based on the
results of a formula.

But you could use an event macro to do it for you:

If you want to try, right click on the worksheet that should have this
behavior. Select View code. Paste this into the code window:

Option Explicit
Private Sub Worksheet_Calculate()
application.enableevents = false
Me.Rows.AutoFit
'or be specific
Me.Rows("1:33").AutoFit
application.enableevents = true
End Sub

Changing the rowheight in some versions of excel (xl2003+, IIRC) will cause the
excel to want to recalc again. The .enableevents stuff stops excel from going
into a loop--recalc, loop, recalc, loop, ....

DK wrote:

Hi,

I'm using a VLOOKUP to display text in different worksheets in the same
workbook.

The trouble I'm having is getting the data to display exactly as it does in
the reference worksheet.

Single cells with a single line of text show correctly, however, if the text
in the single cell is greater than one line or contains bulleted lines, then
the returns in the other worksheets either show a line of hash symbols
(##########) or just the first line of text.

I have used a General format for all the cells on all the worksheets and the
'Wrap Text' checkbox is ticked. I would therefore expect the row height of
the cells that contain the VLOOKUP formula to change so it displays all the
reference data but it doesn't.

Will I have to preset the row heights on the other worksheets so that the
data displays correctly?

I'm using Excel 2k3

DK


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
dk dk is offline
external usenet poster
 
Posts: 129
Default VLOOKUP and Wrap Text

Ahhh, that might be the problem then. It will only be used on cells that are
merged.

"Dave Peterson" wrote:

The macro will work if you're not using merged cells.

DK wrote:

Dave,

Thanks for your help and prompt reply, I used the General format to get rid
of the hash symbols, but unfortunately the event macro doesn't quite fit the
bill so I'll just have to settle for predetermined row heights for now.

The macro condenses the row height to a single line rather than increase it
to fit the text. Kinda back to square one but never mind.

DK

"Dave Peterson" wrote:

The only time I've seen those ###### symbols with text values is when I have the
cell formatted as Text and the length of the text is between 256 and 1024
characters.

Did you convert your formulas to values and then format the cell as text? If
you did, try formatting those offending cells as General.

As for the rowheight stuff, excel won't change the rowheight based on the
results of a formula.

But you could use an event macro to do it for you:

If you want to try, right click on the worksheet that should have this
behavior. Select View code. Paste this into the code window:

Option Explicit
Private Sub Worksheet_Calculate()
application.enableevents = false
Me.Rows.AutoFit
'or be specific
Me.Rows("1:33").AutoFit
application.enableevents = true
End Sub

Changing the rowheight in some versions of excel (xl2003+, IIRC) will cause the
excel to want to recalc again. The .enableevents stuff stops excel from going
into a loop--recalc, loop, recalc, loop, ....

DK wrote:

Hi,

I'm using a VLOOKUP to display text in different worksheets in the same
workbook.

The trouble I'm having is getting the data to display exactly as it does in
the reference worksheet.

Single cells with a single line of text show correctly, however, if the text
in the single cell is greater than one line or contains bulleted lines, then
the returns in the other worksheets either show a line of hash symbols
(##########) or just the first line of text.

I have used a General format for all the cells on all the worksheets and the
'Wrap Text' checkbox is ticked. I would therefore expect the row height of
the cells that contain the VLOOKUP formula to change so it displays all the
reference data but it doesn't.

Will I have to preset the row heights on the other worksheets so that the
data displays correctly?

I'm using Excel 2k3

DK

--

Dave Peterson


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default VLOOKUP and Wrap Text

Jim Rech wrote a macro called AutoFitMergedCellRowHeight that you may like:
http://groups.google.com/groups?thre...%40tkmsftngp05

DK wrote:

Ahhh, that might be the problem then. It will only be used on cells that are
merged.

"Dave Peterson" wrote:

The macro will work if you're not using merged cells.

DK wrote:

Dave,

Thanks for your help and prompt reply, I used the General format to get rid
of the hash symbols, but unfortunately the event macro doesn't quite fit the
bill so I'll just have to settle for predetermined row heights for now.

The macro condenses the row height to a single line rather than increase it
to fit the text. Kinda back to square one but never mind.

DK

"Dave Peterson" wrote:

The only time I've seen those ###### symbols with text values is when I have the
cell formatted as Text and the length of the text is between 256 and 1024
characters.

Did you convert your formulas to values and then format the cell as text? If
you did, try formatting those offending cells as General.

As for the rowheight stuff, excel won't change the rowheight based on the
results of a formula.

But you could use an event macro to do it for you:

If you want to try, right click on the worksheet that should have this
behavior. Select View code. Paste this into the code window:

Option Explicit
Private Sub Worksheet_Calculate()
application.enableevents = false
Me.Rows.AutoFit
'or be specific
Me.Rows("1:33").AutoFit
application.enableevents = true
End Sub

Changing the rowheight in some versions of excel (xl2003+, IIRC) will cause the
excel to want to recalc again. The .enableevents stuff stops excel from going
into a loop--recalc, loop, recalc, loop, ....

DK wrote:

Hi,

I'm using a VLOOKUP to display text in different worksheets in the same
workbook.

The trouble I'm having is getting the data to display exactly as it does in
the reference worksheet.

Single cells with a single line of text show correctly, however, if the text
in the single cell is greater than one line or contains bulleted lines, then
the returns in the other worksheets either show a line of hash symbols
(##########) or just the first line of text.

I have used a General format for all the cells on all the worksheets and the
'Wrap Text' checkbox is ticked. I would therefore expect the row height of
the cells that contain the VLOOKUP formula to change so it displays all the
reference data but it doesn't.

Will I have to preset the row heights on the other worksheets so that the
data displays correctly?

I'm using Excel 2k3

DK

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get date/time to wrap (format - wrap text doesn't work)? Alex Excel Discussion (Misc queries) 3 April 4th 23 02:29 PM
Wrap text doesn't wrap [email protected] Excel Worksheet Functions 1 March 28th 07 01:58 AM
Why won't text in cell wrap. Cell format set to wrap. DRB Excel Discussion (Misc queries) 2 September 28th 06 08:27 PM
Text not continuing to wrap for large block of text in Excel cell Mandra Charts and Charting in Excel 1 May 15th 06 07:13 PM
text (3750 char.)truncates with text wrap and row heigh adjusted? Boydster Excel Discussion (Misc queries) 1 May 19th 05 05:59 PM


All times are GMT +1. The time now is 12:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"