Merge across columns, make cols equal width

jcagle
04-21-2008, 08:57 AM
I created my own homemade calendar on a worksheet. The Month Name across the top and the days (number) below...each day in a seaparate cell. What I would like to do is something like this...

I want to indicate when a certain person will be on location (all done programmatically...i.e., I won't manually be typing in the names into the cells). So, for example, if Stephanie is here from 10-13, her name would appear across the cells under "10, 11, 12 and 13". I want to merge those cells with her name in it, and make the above day cells TOTAL widths equal to the length of her name in the merged cells...i.e., equally distributed across the day cells (with a minimum width). (Am I rambling too much :p ).

I guess what I need to know how to do, is how to determine the width of the merged cells (the text within) and set each day cell width above it accordingly.

I know...this is confusing to explain...so, if anyone needs more description, let me know.

Thanks in advance!

MPi
04-21-2008, 03:18 PM
Welcome jcagle,

First, I'm not sure to understand exactly what you want to show on screen...

But I never merge cells. It only brings problems eventually...

If you want to show multiple names for a specific day, just enter them with a vbLf at the end of each one. Like that they will all show in a single cell. If you need to parse that cell to retrieve individual names, you can use Split() with vbLf as the separator...

jcagle
04-21-2008, 03:41 PM
Thanks for your response. Sorry, it was hard to explain so I'll explain a little more...

I want to put a person's name under the 10, 11, 12, 13 cells (probably merging the cells with the person's name in it). I want those numbered cells, in total, to be the width of the length of the name. In addition, I want the 10, 11, 12, 13 cells to all have the SAME widths.

So, let's say I know "John" has a width of 40. I would then set 10, 11, 12, 13 cells each to 10. The problem is that I don't know how to correlate "John" to column width units. I guess that's what it boils down to.

Thanks again for your help!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum