Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike
 
Posts: n/a
Default Cell sizing in a Vlookup formula to fit information.

Is it possible for a cell to automatically size itself by height to fit the
information pulled into said cell by a VLookup formula. The information in
my data table are of differing lengths. I currently have to stop working in
my spreadsheet to size the cells by height to visually see all the
information.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Cell sizing in a Vlookup formula to fit information.

Could you resize all the usedrange's rowheights each time excel recalculates?

If yes, rightclick on the worksheet tab that should have this behavior. Select
view code and paste this in:

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

If you don't want to do all the rows, you can specify the ones you want:

Option Explicit
Private Sub Worksheet_Calculate()
Me.UsedRange.Range("a5:a12").EntireRow.AutoFit
End Sub

(It resizes 5:12 and leaves the rest alone.)

Mike wrote:

Is it possible for a cell to automatically size itself by height to fit the
information pulled into said cell by a VLookup formula. The information in
my data table are of differing lengths. I currently have to stop working in
my spreadsheet to size the cells by height to visually see all the
information.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike
 
Posts: n/a
Default Cell sizing in a Vlookup formula to fit information.

Dave, You are a genius. That was totally helpful and solved my dilema. I
thank you very much.

"Dave Peterson" wrote:

Could you resize all the usedrange's rowheights each time excel recalculates?

If yes, rightclick on the worksheet tab that should have this behavior. Select
view code and paste this in:

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

If you don't want to do all the rows, you can specify the ones you want:

Option Explicit
Private Sub Worksheet_Calculate()
Me.UsedRange.Range("a5:a12").EntireRow.AutoFit
End Sub

(It resizes 5:12 and leaves the rest alone.)

Mike wrote:

Is it possible for a cell to automatically size itself by height to fit the
information pulled into said cell by a VLookup formula. The information in
my data table are of differing lengths. I currently have to stop working in
my spreadsheet to size the cells by height to visually see all the
information.


--

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
Automatic cell Formating ina VLookup formula Mike Excel Worksheet Functions 3 May 3rd 06 03:43 PM
Using cell information in formula? Gruben Excel Worksheet Functions 1 October 20th 05 11:52 AM
Creating a check mark box MarthaSue Setting up and Configuration of Excel 18 April 28th 05 12:31 AM
inserting data from a row to a cell, when the row number is specified by a formula in a cell [email protected] New Users to Excel 2 January 6th 05 07:18 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 08:01 AM.

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"