Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Detecting if a value "fits" in a cell.


Is it possible to detect if a value is being fully displayed in a cell? I
want to resize a cell so that text won't flow over adjectent cells and
numbers don't display as the ##### thing. To do that I need a check to see if
the value fits in the first place.

I have a report where users are being asked to comment on financial
preformance. As always my users don't want to play ball, and we can't agree
on how big the comment cell should be. I'd like to be able to grow or srink
it depending on the comment provided.

no replys about srink to fit and word warp, please.


- Rm
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Detecting if a value "fits" in a cell.

no replys about srink to fit and word warp, please.
What about:

range("D4").EntireColumn.AutoFit

Regards
Rowan

Robert Mulroney wrote:
Is it possible to detect if a value is being fully displayed in a cell? I
want to resize a cell so that text won't flow over adjectent cells and
numbers don't display as the ##### thing. To do that I need a check to see if
the value fits in the first place.

I have a report where users are being asked to comment on financial
preformance. As always my users don't want to play ball, and we can't agree
on how big the comment cell should be. I'd like to be able to grow or srink
it depending on the comment provided.

no replys about srink to fit and word warp, please.


- Rm

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Detecting if a value "fits" in a cell.



Ah, good, thanks. It suits me better to use entirerow instead of
entirecolumn. BUT, can you make it work for a merged cell?

- Rm

"Rowan Drummond" wrote:

no replys about srink to fit and word warp, please.

What about:

range("D4").EntireColumn.AutoFit

Regards
Rowan

Robert Mulroney wrote:
Is it possible to detect if a value is being fully displayed in a cell? I
want to resize a cell so that text won't flow over adjectent cells and
numbers don't display as the ##### thing. To do that I need a check to see if
the value fits in the first place.

I have a report where users are being asked to comment on financial
preformance. As always my users don't want to play ball, and we can't agree
on how big the comment cell should be. I'd like to be able to grow or srink
it depending on the comment provided.

no replys about srink to fit and word warp, please.


- Rm


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Detecting if a value "fits" in a cell.

Merged cells are generally a nightmare to work with but I'll give it a
go. Is it merged vertically (eg A1:A2) or horizontally (eg A1:B1).

Regards
Rowan

Robert Mulroney wrote:

Ah, good, thanks. It suits me better to use entirerow instead of
entirecolumn. BUT, can you make it work for a merged cell?

- Rm

"Rowan Drummond" wrote:


no replys about srink to fit and word warp, please.

What about:

range("D4").EntireColumn.AutoFit

Regards
Rowan

Robert Mulroney wrote:

Is it possible to detect if a value is being fully displayed in a cell? I
want to resize a cell so that text won't flow over adjectent cells and
numbers don't display as the ##### thing. To do that I need a check to see if
the value fits in the first place.

I have a report where users are being asked to comment on financial
preformance. As always my users don't want to play ball, and we can't agree
on how big the comment cell should be. I'd like to be able to grow or srink
it depending on the comment provided.

no replys about srink to fit and word warp, please.


- Rm


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Detecting if a value "fits" in a cell.



um... both (he say's sheepishly). It really only needs to be merged across
the columns I suppose. We're looking at fitting the row height using auto fit
that might make it a bit easier.

- Rm



"Rowan Drummond" wrote:

Merged cells are generally a nightmare to work with but I'll give it a
go. Is it merged vertically (eg A1:A2) or horizontally (eg A1:B1).

Regards
Rowan

Robert Mulroney wrote:

Ah, good, thanks. It suits me better to use entirerow instead of
entirecolumn. BUT, can you make it work for a merged cell?

- Rm

"Rowan Drummond" wrote:


no replys about srink to fit and word warp, please.
What about:

range("D4").EntireColumn.AutoFit

Regards
Rowan

Robert Mulroney wrote:

Is it possible to detect if a value is being fully displayed in a cell? I
want to resize a cell so that text won't flow over adjectent cells and
numbers don't display as the ##### thing. To do that I need a check to see if
the value fits in the first place.

I have a report where users are being asked to comment on financial
preformance. As always my users don't want to play ball, and we can't agree
on how big the comment cell should be. I'd like to be able to grow or srink
it depending on the comment provided.

no replys about srink to fit and word warp, please.


- Rm




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Detecting if a value "fits" in a cell.

The autofit command does not appear to work with merged cells (no
surprises there).

If you only need your merging across columns then maybe you could remove
the merge and replace it with Center Across Selection. I am assuming you
already have Wrap Text applied which is why you are wanting to set the
autofit to the row. With Center Across Selection and Wrap Text applied
the row may automatically resize to fit the text but if not you can then
use:

range("B5").entirerow.autofit

Hope this helps
Rowan

Robert Mulroney wrote:

um... both (he say's sheepishly). It really only needs to be merged across
the columns I suppose. We're looking at fitting the row height using auto fit
that might make it a bit easier.

- Rm



"Rowan Drummond" wrote:


Merged cells are generally a nightmare to work with but I'll give it a
go. Is it merged vertically (eg A1:A2) or horizontally (eg A1:B1).

Regards
Rowan

Robert Mulroney wrote:

Ah, good, thanks. It suits me better to use entirerow instead of
entirecolumn. BUT, can you make it work for a merged cell?

- Rm

"Rowan Drummond" wrote:



no replys about srink to fit and word warp, please.

What about:

range("D4").EntireColumn.AutoFit

Regards
Rowan

Robert Mulroney wrote:


Is it possible to detect if a value is being fully displayed in a cell? I
want to resize a cell so that text won't flow over adjectent cells and
numbers don't display as the ##### thing. To do that I need a check to see if
the value fits in the first place.

I have a report where users are being asked to comment on financial
preformance. As always my users don't want to play ball, and we can't agree
on how big the comment cell should be. I'd like to be able to grow or srink
it depending on the comment provided.

no replys about srink to fit and word warp, please.


- Rm

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Detecting if a value "fits" in a cell.


ok, I'll try that thanks very much for your help.

- Rm

"Rowan Drummond" wrote:

The autofit command does not appear to work with merged cells (no
surprises there).

If you only need your merging across columns then maybe you could remove
the merge and replace it with Center Across Selection. I am assuming you
already have Wrap Text applied which is why you are wanting to set the
autofit to the row. With Center Across Selection and Wrap Text applied
the row may automatically resize to fit the text but if not you can then
use:

range("B5").entirerow.autofit

Hope this helps
Rowan

Robert Mulroney wrote:

um... both (he say's sheepishly). It really only needs to be merged across
the columns I suppose. We're looking at fitting the row height using auto fit
that might make it a bit easier.

- Rm



"Rowan Drummond" wrote:


Merged cells are generally a nightmare to work with but I'll give it a
go. Is it merged vertically (eg A1:A2) or horizontally (eg A1:B1).

Regards
Rowan

Robert Mulroney wrote:

Ah, good, thanks. It suits me better to use entirerow instead of
entirecolumn. BUT, can you make it work for a merged cell?

- Rm

"Rowan Drummond" wrote:



no replys about srink to fit and word warp, please.

What about:

range("D4").EntireColumn.AutoFit

Regards
Rowan

Robert Mulroney wrote:


Is it possible to detect if a value is being fully displayed in a cell? I
want to resize a cell so that text won't flow over adjectent cells and
numbers don't display as the ##### thing. To do that I need a check to see if
the value fits in the first place.

I have a report where users are being asked to comment on financial
preformance. As always my users don't want to play ball, and we can't agree
on how big the comment cell should be. I'd like to be able to grow or srink
it depending on the comment provided.

no replys about srink to fit and word warp, please.


- Rm


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Detecting if a value "fits" in a cell.

Merged cells don't play nice with autofitting rowheights.

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

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Robert Mulroney wrote:

Is it possible to detect if a value is being fully displayed in a cell? I
want to resize a cell so that text won't flow over adjectent cells and
numbers don't display as the ##### thing. To do that I need a check to see if
the value fits in the first place.

I have a report where users are being asked to comment on financial
preformance. As always my users don't want to play ball, and we can't agree
on how big the comment cell should be. I'd like to be able to grow or srink
it depending on the comment provided.

no replys about srink to fit and word warp, please.

- Rm


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Detecting if a value "fits" in a cell.

Hi Rowan,

I share your dislike of merged cells and never use them.

However, Jim Rech has posted code to address the merged cells / autofit
problem. See the final post in the following thread:

http://tinyurl.com/aknxy


---
Regards,
Norman



"Rowan Drummond" wrote in message
...
The autofit command does not appear to work with merged cells (no
surprises there).

If you only need your merging across columns then maybe you could remove
the merge and replace it with Center Across Selection. I am assuming you
already have Wrap Text applied which is why you are wanting to set the
autofit to the row. With Center Across Selection and Wrap Text applied the
row may automatically resize to fit the text but if not you can then use:

range("B5").entirerow.autofit

Hope this helps
Rowan

Robert Mulroney wrote:

um... both (he say's sheepishly). It really only needs to be merged
across the columns I suppose. We're looking at fitting the row height
using auto fit that might make it a bit easier.

- Rm



"Rowan Drummond" wrote:


Merged cells are generally a nightmare to work with but I'll give it a
go. Is it merged vertically (eg A1:A2) or horizontally (eg A1:B1).

Regards
Rowan

Robert Mulroney wrote:

Ah, good, thanks. It suits me better to use entirerow instead of
entirecolumn. BUT, can you make it work for a merged cell?

- Rm

"Rowan Drummond" wrote:



no replys about srink to fit and word warp, please.

What about:

range("D4").EntireColumn.AutoFit

Regards
Rowan

Robert Mulroney wrote:


Is it possible to detect if a value is being fully displayed in a
cell? I want to resize a cell so that text won't flow over adjectent
cells and numbers don't display as the ##### thing. To do that I need
a check to see if the value fits in the first place.

I have a report where users are being asked to comment on financial
preformance. As always my users don't want to play ball, and we can't
agree on how big the comment cell should be. I'd like to be able to
grow or srink it depending on the comment provided.
no replys about srink to fit and word warp, please.

- Rm



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Detecting if a value "fits" in a cell.

Thanks for that Norman. Hopefully the OP will return here and find it if
he doesn't succeed with removing the merged cell.

Kind Regards
Rowan

Norman Jones wrote:
Hi Rowan,

I share your dislike of merged cells and never use them.

However, Jim Rech has posted code to address the merged cells / autofit
problem. See the final post in the following thread:

http://tinyurl.com/aknxy


---
Regards,
Norman



"Rowan Drummond" wrote in message
...

The autofit command does not appear to work with merged cells (no
surprises there).

If you only need your merging across columns then maybe you could remove
the merge and replace it with Center Across Selection. I am assuming you
already have Wrap Text applied which is why you are wanting to set the
autofit to the row. With Center Across Selection and Wrap Text applied the
row may automatically resize to fit the text but if not you can then use:

range("B5").entirerow.autofit

Hope this helps
Rowan

Robert Mulroney wrote:

um... both (he say's sheepishly). It really only needs to be merged
across the columns I suppose. We're looking at fitting the row height
using auto fit that might make it a bit easier.

- Rm



"Rowan Drummond" wrote:



Merged cells are generally a nightmare to work with but I'll give it a
go. Is it merged vertically (eg A1:A2) or horizontally (eg A1:B1).

Regards
Rowan

Robert Mulroney wrote:


Ah, good, thanks. It suits me better to use entirerow instead of
entirecolumn. BUT, can you make it work for a merged cell?

- Rm

"Rowan Drummond" wrote:




no replys about srink to fit and word warp, please.

What about:

range("D4").EntireColumn.AutoFit

Regards
Rowan

Robert Mulroney wrote:



Is it possible to detect if a value is being fully displayed in a
cell? I want to resize a cell so that text won't flow over adjectent
cells and numbers don't display as the ##### thing. To do that I need
a check to see if the value fits in the first place.

I have a report where users are being asked to comment on financial
preformance. As always my users don't want to play ball, and we can't
agree on how big the comment cell should be. I'd like to be able to
grow or srink it depending on the comment provided.
no replys about srink to fit and word warp, please.

- Rm





  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Detecting if a value "fits" in a cell.


That's got, thanks muchly all involved. It's the little things like this
that go a long way to use acceptance of any system.

- Rm


"Rowan Drummond" wrote:

Thanks for that Norman. Hopefully the OP will return here and find it if
he doesn't succeed with removing the merged cell.

Kind Regards
Rowan

Norman Jones wrote:
Hi Rowan,

I share your dislike of merged cells and never use them.

However, Jim Rech has posted code to address the merged cells / autofit
problem. See the final post in the following thread:

http://tinyurl.com/aknxy


---
Regards,
Norman



"Rowan Drummond" wrote in message
...

The autofit command does not appear to work with merged cells (no
surprises there).

If you only need your merging across columns then maybe you could remove
the merge and replace it with Center Across Selection. I am assuming you
already have Wrap Text applied which is why you are wanting to set the
autofit to the row. With Center Across Selection and Wrap Text applied the
row may automatically resize to fit the text but if not you can then use:

range("B5").entirerow.autofit

Hope this helps
Rowan

Robert Mulroney wrote:

um... both (he say's sheepishly). It really only needs to be merged
across the columns I suppose. We're looking at fitting the row height
using auto fit that might make it a bit easier.

- Rm



"Rowan Drummond" wrote:



Merged cells are generally a nightmare to work with but I'll give it a
go. Is it merged vertically (eg A1:A2) or horizontally (eg A1:B1).

Regards
Rowan

Robert Mulroney wrote:


Ah, good, thanks. It suits me better to use entirerow instead of
entirecolumn. BUT, can you make it work for a merged cell?

- Rm

"Rowan Drummond" wrote:




no replys about srink to fit and word warp, please.

What about:

range("D4").EntireColumn.AutoFit

Regards
Rowan

Robert Mulroney wrote:



Is it possible to detect if a value is being fully displayed in a
cell? I want to resize a cell so that text won't flow over adjectent
cells and numbers don't display as the ##### thing. To do that I need
a check to see if the value fits in the first place.

I have a report where users are being asked to comment on financial
preformance. As always my users don't want to play ball, and we can't
agree on how big the comment cell should be. I'd like to be able to
grow or srink it depending on the comment provided.
no replys about srink to fit and word warp, please.

- Rm




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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
"CELL("FILENAME") NOT UPDATE AFTER "SAVE AS" ACTION yossie6 Excel Discussion (Misc queries) 1 June 16th 08 12:16 PM
Help!!! Enter "7" in a cell and Excel changes the "7" to "11" immediately!!! [email protected] Excel Discussion (Misc queries) 3 January 5th 07 02:18 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM


All times are GMT +1. The time now is 02:18 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"