Resizing cells to fit text returned by VLOOKUP

I have some VLOOKUPs which sometimes return 50 or 60 characters (they're in 
merged cells). I want the text to wrap, and the cell to enlarge to fit the 
text - Just like it does whan you type it in, but somehow, because it is 
being returned from a formula it just displays the bottom line of the 
wrapped text, and doesn't resize the row.

Anyone know how I cam make it fit?

I'm happy to use a VBA solution if there's no built in way to make it happen 
automatically.

Thanks

M

0
9/3/2009 9:18:39 AM
excel 39880 articles. 2 followers. Follow

10 Replies
1040 Views

Similar Articles

[PageSpeed] 13

Would you mind to limit your request to ONE newsgroup?
Joerg

"Michelle" <mh_londonNOJUNK@hotmail.com> wrote in message 
news:44EB431F-4EDB-4AD1-98CF-774D61B59636@microsoft.com...
>I have some VLOOKUPs which sometimes return 50 or 60 characters (they're in 
>merged cells). I want the text to wrap, and the cell to enlarge to fit the 
>text - Just like it does whan you type it in, but somehow, because it is 
>being returned from a formula it just displays the bottom line of the 
>wrapped text, and doesn't resize the row.
>
> Anyone know how I cam make it fit?
>
> I'm happy to use a VBA solution if there's no built in way to make it 
> happen automatically.
>
> Thanks
>
> M
> 


0
no3581 (99)
9/3/2009 9:33:52 AM
Yes, I do mind. I get lots of stroppy replies if I post similar requests to 
more than one group, and often a question is relevant to more than one 
group - as in this case - you can see how it is relevant to Functions, and 
Misc, but also there might be a VBA solution. So posting to multiple groups 
in such a way that any replies appear in all groups is a generally prefered 
ettiquette.

Why do you have a problem with it? Others have recommended it as the right 
way.

M  :)

"Joerg Mochikun" <no@email.address> wrote in message 
news:h7o2i2$2kh$1@daniel-new.mch.sbs.de...
> Would you mind to limit your request to ONE newsgroup?
> Joerg
>
> "Michelle" <mh_londonNOJUNK@hotmail.com> wrote in message 
> news:44EB431F-4EDB-4AD1-98CF-774D61B59636@microsoft.com...
>>I have some VLOOKUPs which sometimes return 50 or 60 characters (they're 
>>in merged cells). I want the text to wrap, and the cell to enlarge to fit 
>>the text - Just like it does whan you type it in, but somehow, because it 
>>is being returned from a formula it just displays the bottom line of the 
>>wrapped text, and doesn't resize the row.
>>
>> Anyone know how I cam make it fit?
>>
>> I'm happy to use a VBA solution if there's no built in way to make it 
>> happen automatically.
>>
>> Thanks
>>
>> M
>>
>
> 

0
9/3/2009 10:29:17 AM
Sub Macro()
Cells.SpecialCells(xlCellTypeFormulas).WrapText = True
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Michelle" wrote:

> I have some VLOOKUPs which sometimes return 50 or 60 characters (they're in 
> merged cells). I want the text to wrap, and the cell to enlarge to fit the 
> text - Just like it does whan you type it in, but somehow, because it is 
> being returned from a formula it just displays the bottom line of the 
> wrapped text, and doesn't resize the row.
> 
> Anyone know how I cam make it fit?
> 
> I'm happy to use a VBA solution if there's no built in way to make it happen 
> automatically.
> 
> Thanks
> 
> M
> 
0
9/3/2009 11:09:01 AM
No, Thanks, but WrapText is already on for these cells, it's just that the 
row height is not adjusting automatically.

M


"Jacob Skaria" <JacobSkaria@discussions.microsoft.com> wrote in message 
news:385CB93B-8AC8-43C6-90F6-0389931FCE37@microsoft.com...
> Sub Macro()
> Cells.SpecialCells(xlCellTypeFormulas).WrapText = True
> End Sub
>
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>
> "Michelle" wrote:
>
>> I have some VLOOKUPs which sometimes return 50 or 60 characters (they're 
>> in
>> merged cells). I want the text to wrap, and the cell to enlarge to fit 
>> the
>> text - Just like it does whan you type it in, but somehow, because it is
>> being returned from a formula it just displays the bottom line of the
>> wrapped text, and doesn't resize the row.
>>
>> Anyone know how I cam make it fit?
>>
>> I'm happy to use a VBA solution if there's no built in way to make it 
>> happen
>> automatically.
>>
>> Thanks
>>
>> M
>> 

0
9/3/2009 11:26:34 AM
Cells.SpecialCells(xlCellTypeFormulas).Rows.AutoFit

If this post helps click Yes
---------------
Jacob Skaria


"Michelle" wrote:

> No, Thanks, but WrapText is already on for these cells, it's just that the 
> row height is not adjusting automatically.
> 
> M
> 
> 
> "Jacob Skaria" <JacobSkaria@discussions.microsoft.com> wrote in message 
> news:385CB93B-8AC8-43C6-90F6-0389931FCE37@microsoft.com...
> > Sub Macro()
> > Cells.SpecialCells(xlCellTypeFormulas).WrapText = True
> > End Sub
> >
> > If this post helps click Yes
> > ---------------
> > Jacob Skaria
> >
> >
> > "Michelle" wrote:
> >
> >> I have some VLOOKUPs which sometimes return 50 or 60 characters (they're 
> >> in
> >> merged cells). I want the text to wrap, and the cell to enlarge to fit 
> >> the
> >> text - Just like it does whan you type it in, but somehow, because it is
> >> being returned from a formula it just displays the bottom line of the
> >> wrapped text, and doesn't resize the row.
> >>
> >> Anyone know how I cam make it fit?
> >>
> >> I'm happy to use a VBA solution if there's no built in way to make it 
> >> happen
> >> automatically.
> >>
> >> Thanks
> >>
> >> M
> >> 
> 
0
9/3/2009 11:41:01 AM
Thanks but unfortunately that doesn't work either, it would if it were text, 
but because it's coming from a VLOOKUP, for some reason it doesn't work.

I wonder if there's something I've overlooked?

M


"Jacob Skaria" <JacobSkaria@discussions.microsoft.com> wrote in message 
news:ACBB82FC-C62E-4EA7-987D-9F3190E906C8@microsoft.com...
> Cells.SpecialCells(xlCellTypeFormulas).Rows.AutoFit
>
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>
> "Michelle" wrote:
>
>> No, Thanks, but WrapText is already on for these cells, it's just that 
>> the
>> row height is not adjusting automatically.
>>
>> M
>>
>>
>> "Jacob Skaria" <JacobSkaria@discussions.microsoft.com> wrote in message
>> news:385CB93B-8AC8-43C6-90F6-0389931FCE37@microsoft.com...
>> > Sub Macro()
>> > Cells.SpecialCells(xlCellTypeFormulas).WrapText = True
>> > End Sub
>> >
>> > If this post helps click Yes
>> > ---------------
>> > Jacob Skaria
>> >
>> >
>> > "Michelle" wrote:
>> >
>> >> I have some VLOOKUPs which sometimes return 50 or 60 characters 
>> >> (they're
>> >> in
>> >> merged cells). I want the text to wrap, and the cell to enlarge to fit
>> >> the
>> >> text - Just like it does whan you type it in, but somehow, because it 
>> >> is
>> >> being returned from a formula it just displays the bottom line of the
>> >> wrapped text, and doesn't resize the row.
>> >>
>> >> Anyone know how I cam make it fit?
>> >>
>> >> I'm happy to use a VBA solution if there's no built in way to make it
>> >> happen
>> >> automatically.
>> >>
>> >> Thanks
>> >>
>> >> M
>> >>
>> 

0
9/3/2009 12:26:19 PM
First, working with merged cells is a real pain.  

They don't behave nicely in lots of situations (autofitting row height is just
the tip of the iceberg!)

Second, excel doesn't keep track of what cells are changed because of a
calculation.  So you'd have to look through all the cells with formulas which
could be a pain, too.

Third, there's no easy way to find merged cells.

That said...

Jim Rech wrote a macro called AutoFitMergedCellRowHeight:
http://groups.google.com/groups?threadm=e1%241uzL1BHA.1784%40tkmsftngp05

This could be modified to tie into a worksheet_calculate event.

If you want to try...

This goes behind the worksheet that has the merged cells with formulas in it.

Option Explicit
Private Sub Worksheet_Calculate()

    Dim myRng As Range
    Dim myCell As Range
    
    'define your range with the addresses of the
    'merged cells formulas
    'or give it a nice name
    'Set myRng = Me.Range("a1,b3,c7")
    'Set myRng = Me.Range("MyMergedCells")
        
    'or look through all the formulas
    Set myRng = Nothing
    On Error Resume Next
    Set myRng = Me.Cells.SpecialCells(xlCellTypeFormulas)
    On Error GoTo 0
    
    If myRng Is Nothing Then
        Exit Sub 'no formulas found
    End If
    
    On Error Resume Next
    Application.EnableEvents = False
    For Each myCell In myRng.Cells
        If myCell.MergeArea.Cells.Count = 1 Then
            'do nothing, not a merged cell
        Else
            Call AutoFitMergedCellRowHeight(ActCell:=myCell)
        End If
    Next myCell
    Application.EnableEvents = True
    On Error GoTo 0

End Sub

You'll want to use what's best for you in this portion:

    'define your range with the addresses of the
    'merged cells formulas
    'or give it a nice name
    'Set myRng = Me.Range("a1,b3,c7")        'Option 1
    'Set myRng = Me.Range("MyMergedCells")   'Option 2
        
    'or look through all the formulas  'Option 3 (next 4 lines)
    Set myRng = Nothing
    On Error Resume Next
    Set myRng = Me.Cells.SpecialCells(xlCellTypeFormulas)
    On Error GoTo 0

My preference would be to use the named range (select the cells and then
insert|name|define).  Then I wouldn't be looking through all the formulas with
each calculation.  (If you move cells to a new location (inserting/deleting rows
or columns), you'd have to adjust that list of addresses.)

You can comment the options you don't want--and uncomment the line(s) that you
want to use.

This portion does all the work.  It goes in a General module (Insert|Module
inside the VBE).

Option Explicit
''based on Jim Rech's code
''http://groups.google.com/groups?threadm=e1%241uzL1BHA.1784%40tkmsftngp05
''Simulates row height autofit for a merged cell if the active cell..
''  is merged.
''  has Wrap Text set.
''  includes only 1 row.
''Unlike real autosizing the macro only increases row height
''  (if needed).  It does not reduce row height because another
''   merged cell on the same row may needed a greater height
''   than the active cell.
Sub AutoFitMergedCellRowHeight(ActCell As Range)
    Dim CurrentRowHeight As Single, MergedCellRgWidth As Single
    Dim CurrCell As Range
    Dim ActiveCellWidth As Single, PossNewRowHeight As Single
    If ActCell.MergeCells Then
       With ActCell.MergeArea
            If .Rows.Count = 1 And .WrapText = True Then
                Application.ScreenUpdating = False
                CurrentRowHeight = .RowHeight
                ActiveCellWidth = ActCell.ColumnWidth
                For Each CurrCell In .Cells
                    MergedCellRgWidth _
                         = CurrCell.ColumnWidth + MergedCellRgWidth
                Next CurrCell
                .MergeCells = False
                .Cells(1).ColumnWidth = MergedCellRgWidth
                .EntireRow.AutoFit
                PossNewRowHeight = .RowHeight
                .Cells(1).ColumnWidth = ActiveCellWidth
                .MergeCells = True
                .RowHeight = IIf(CurrentRowHeight > PossNewRowHeight, _
                                     CurrentRowHeight, PossNewRowHeight)
            End If
        End With
    End If
End Sub

Notice the comment in Jim's code:

''Unlike real autosizing the macro only increases row height
''  (if needed).  It does not reduce row height because another
''   merged cell on the same row may needed a greater height
''   than the active cell.





Michelle wrote:
> 
> I have some VLOOKUPs which sometimes return 50 or 60 characters (they're in
> merged cells). I want the text to wrap, and the cell to enlarge to fit the
> text - Just like it does whan you type it in, but somehow, because it is
> being returned from a formula it just displays the bottom line of the
> wrapped text, and doesn't resize the row.
> 
> Anyone know how I cam make it fit?
> 
> I'm happy to use a VBA solution if there's no built in way to make it happen
> automatically.
> 
> Thanks
> 
> M

-- 

Dave Peterson
0
petersod (12004)
9/3/2009 12:46:03 PM
Thanks Dave. I have a working solution - really appreciate the time you 
spent putting this together.

M


"Dave Peterson" <petersod@verizonXSPAM.net> wrote in message 
news:4A9FBA8B.E811ACEA@verizonXSPAM.net...
> First, working with merged cells is a real pain.
>
> They don't behave nicely in lots of situations (autofitting row height is 
> just
> the tip of the iceberg!)
>
> Second, excel doesn't keep track of what cells are changed because of a
> calculation.  So you'd have to look through all the cells with formulas 
> which
> could be a pain, too.
>
> Third, there's no easy way to find merged cells.
>
> That said...
>
> Jim Rech wrote a macro called AutoFitMergedCellRowHeight:
> http://groups.google.com/groups?threadm=e1%241uzL1BHA.1784%40tkmsftngp05
>
> This could be modified to tie into a worksheet_calculate event.
>
> If you want to try...
>
> This goes behind the worksheet that has the merged cells with formulas in 
> it.
>
> Option Explicit
> Private Sub Worksheet_Calculate()
>
>    Dim myRng As Range
>    Dim myCell As Range
>
>    'define your range with the addresses of the
>    'merged cells formulas
>    'or give it a nice name
>    'Set myRng = Me.Range("a1,b3,c7")
>    'Set myRng = Me.Range("MyMergedCells")
>
>    'or look through all the formulas
>    Set myRng = Nothing
>    On Error Resume Next
>    Set myRng = Me.Cells.SpecialCells(xlCellTypeFormulas)
>    On Error GoTo 0
>
>    If myRng Is Nothing Then
>        Exit Sub 'no formulas found
>    End If
>
>    On Error Resume Next
>    Application.EnableEvents = False
>    For Each myCell In myRng.Cells
>        If myCell.MergeArea.Cells.Count = 1 Then
>            'do nothing, not a merged cell
>        Else
>            Call AutoFitMergedCellRowHeight(ActCell:=myCell)
>        End If
>    Next myCell
>    Application.EnableEvents = True
>    On Error GoTo 0
>
> End Sub
>
> You'll want to use what's best for you in this portion:
>
>    'define your range with the addresses of the
>    'merged cells formulas
>    'or give it a nice name
>    'Set myRng = Me.Range("a1,b3,c7")        'Option 1
>    'Set myRng = Me.Range("MyMergedCells")   'Option 2
>
>    'or look through all the formulas  'Option 3 (next 4 lines)
>    Set myRng = Nothing
>    On Error Resume Next
>    Set myRng = Me.Cells.SpecialCells(xlCellTypeFormulas)
>    On Error GoTo 0
>
> My preference would be to use the named range (select the cells and then
> insert|name|define).  Then I wouldn't be looking through all the formulas 
> with
> each calculation.  (If you move cells to a new location 
> (inserting/deleting rows
> or columns), you'd have to adjust that list of addresses.)
>
> You can comment the options you don't want--and uncomment the line(s) that 
> you
> want to use.
>
> This portion does all the work.  It goes in a General module 
> (Insert|Module
> inside the VBE).
>
> Option Explicit
> ''based on Jim Rech's code
> ''http://groups.google.com/groups?threadm=e1%241uzL1BHA.1784%40tkmsftngp05
> ''Simulates row height autofit for a merged cell if the active cell..
> ''  is merged.
> ''  has Wrap Text set.
> ''  includes only 1 row.
> ''Unlike real autosizing the macro only increases row height
> ''  (if needed).  It does not reduce row height because another
> ''   merged cell on the same row may needed a greater height
> ''   than the active cell.
> Sub AutoFitMergedCellRowHeight(ActCell As Range)
>    Dim CurrentRowHeight As Single, MergedCellRgWidth As Single
>    Dim CurrCell As Range
>    Dim ActiveCellWidth As Single, PossNewRowHeight As Single
>    If ActCell.MergeCells Then
>       With ActCell.MergeArea
>            If .Rows.Count = 1 And .WrapText = True Then
>                Application.ScreenUpdating = False
>                CurrentRowHeight = .RowHeight
>                ActiveCellWidth = ActCell.ColumnWidth
>                For Each CurrCell In .Cells
>                    MergedCellRgWidth _
>                         = CurrCell.ColumnWidth + MergedCellRgWidth
>                Next CurrCell
>                .MergeCells = False
>                .Cells(1).ColumnWidth = MergedCellRgWidth
>                .EntireRow.AutoFit
>                PossNewRowHeight = .RowHeight
>                .Cells(1).ColumnWidth = ActiveCellWidth
>                .MergeCells = True
>                .RowHeight = IIf(CurrentRowHeight > PossNewRowHeight, _
>                                     CurrentRowHeight, PossNewRowHeight)
>            End If
>        End With
>    End If
> End Sub
>
> Notice the comment in Jim's code:
>
> ''Unlike real autosizing the macro only increases row height
> ''  (if needed).  It does not reduce row height because another
> ''   merged cell on the same row may needed a greater height
> ''   than the active cell.
>
>
>
>
>
> Michelle wrote:
>>
>> I have some VLOOKUPs which sometimes return 50 or 60 characters (they're 
>> in
>> merged cells). I want the text to wrap, and the cell to enlarge to fit 
>> the
>> text - Just like it does whan you type it in, but somehow, because it is
>> being returned from a formula it just displays the bottom line of the
>> wrapped text, and doesn't resize the row.
>>
>> Anyone know how I cam make it fit?
>>
>> I'm happy to use a VBA solution if there's no built in way to make it 
>> happen
>> automatically.
>>
>> Thanks
>>
>> M
>
> -- 
>
> Dave Peterson 

0
9/3/2009 2:14:13 PM
On Thu, 3 Sep 2009 11:29:17 +0100, "Michelle" <mh_londonNOJUNK@hotmail.com>
wrote:

>Yes, I do mind. I get lots of stroppy replies if I post similar requests to 
>more than one group, and often a question is relevant to more than one 
>group - as in this case - you can see how it is relevant to Functions, and 
>Misc, but also there might be a VBA solution. So posting to multiple groups 
>in such a way that any replies appear in all groups is a generally prefered 
>ettiquette.
>
>Why do you have a problem with it? Others have recommended it as the right 
>way.
>
>M  :)
>


Maybe he's confusing *cross-posting* (which you did and is proper) with
*multi-posting*, where you post separate messages to each of the NG's.
--ron
0
ronrosenfeld (3123)
9/3/2009 4:25:31 PM
"Ron Rosenfeld" <ronrosenfeld@nospam.org> wrote in message 
news:4erv95d1s64mcpo5gnae59stm0pm526juk@4ax.com...
> On Thu, 3 Sep 2009 11:29:17 +0100, "Michelle" 
> <mh_londonNOJUNK@hotmail.com>
> wrote:
>
>>Yes, I do mind. I get lots of stroppy replies if I post similar requests 
>>to
>>more than one group, and often a question is relevant to more than one
>>group - as in this case - you can see how it is relevant to Functions, and
>>Misc, but also there might be a VBA solution. So posting to multiple 
>>groups
>>in such a way that any replies appear in all groups is a generally 
>>prefered
>>ettiquette.
>>
>>Why do you have a problem with it? Others have recommended it as the right
>>way.
>>
>>M  :)
>>
>
>
> Maybe he's confusing *cross-posting* (which you did and is proper) with
> *multi-posting*, where you post separate messages to each of the NG's.
> --ron

Yes, I did. Sorry and shame on me.
Joerg


0
no3581 (99)
9/4/2009 1:10:54 AM
Reply:

Similar Artilces:

wrapping text in powerpoiont charts
how do io wrap text in charts so the wording does not run together ...

making all formulas appear in the cells instead of values
Hi all, How do I make all the existing formulas in a worksheet appear on it, instead of the resulting values? I opened a worksheet that have looks this way, but I don't know how it was done. Thanks in advance, Alejandro I found it out! tools/options/view/formulas Thx! -- Alejandro Caballero Aste Ministerio de Econom�a y Finanzas Direcci�n General de Asuntos de Econom�a Internacional, Competencia e Inversi�n Privada Tlf 311-5930 Axo 3536 ecaballero@mef.gob.pe "Alejandro Caballero Aste" <ecaballero@mef.gob.pe> wrote in message news:%23qJrSVgVHHA.4796@TK2MSFTNGP05...

Copy cell to a new cell #2
In Column B I have certain values which start with GB2 e.g GB2-02210. I would to like to copy these values and paste it in another cell. I would like to do this with only values which start with GB2. Many thanks -- Message posted via http://www.officekb.com I would use Data>Filter>Autofilter and use custom>begins with... -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England www.nickhodge.co.uk nick_hodgeTAKETHISOUT@zen.co.uk.ANDTHIS "mohd21uk via OfficeKB.com" <u20517@uwe> wrote in message news:5ede27c5beb13@uwe... > In Column B I have certain values ...

Create static text from cell reference
Hey everyone... I have two columns of text which I'm combining in a third column using the formula (for C1, for example) =A1 & char(10) & B1 This gives me the contents of A1 on a line above the contents of B1 and works fine. What I NEED to do is somehow create column C as TEXT, not as a REFERENCED data from columns A and B. How do I create a cell that contains the actual TEXT content of another cell instead of a REFERENCE to the other cell? TIA... Select all the cells in "C" that have content. R-click them and select "Copy" then r-click again, sele...

Text Highlighting in Yellow (2000) ???
This is a multi-part message in MIME format. ------=_NextPart_000_000B_01C600B3.07A33400 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable People, Is there a way to highlight text in yellow...in Publisher 2000. This is such a basic text function...available in *Word* for example...& = they can't provide this? Thanks, mark4man ------=_NextPart_000_000B_01C600B3.07A33400 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transiti...

problem with resizing
Hi! I'm writing a MDI application. Child window is splitted in three panes. In the one pane I've got a FormView with some buttons. How to do, that this FormView was in the center of a pane (even during resizing )? And the second problem, how to do, that during resizing, splitters dividing window were always in the same places? Please, help me. I would be appreciate. bart ...

Spellcheck includes reply or forward text
I gradually have become aware that Outlook is now including the original message text in spellcheck when I reply or forward. However, the "Ignore original message text in reply or forward" option is checked on the Spelling tab in Options. I'm running Outlook 2003. What's up with this? Bryan If you're using the option to prefix plain-text replies with a character (like >) then the original will get checked "Bryan L" <blinton.nospam@connellinsurance.nospam.com> wrote in message news:uxpZHuT5FHA.3908@tk2msftngp13.phx.gbl... >I gradually ha...

Cell flashing
Does anyone know how to format a cell so it will flash or blink ? It's possible to do so with code but its a bad idea, you'll find such (bad) code by searching Google. There is no built in function like Word in Excel and if you do use such code the results are usually jumpy and erratic, plus the processor is unavailable to do anything else until the code is stopped from running, ie the machine is virtually locked up, Regards, Alan. "Skioregon" <Skioregon@discussions.microsoft.com> wrote in message news:AD31EA15-BC24-4074-85DA-D826B871EE55@microsoft.com... > D...

use VLookup to copy more than 1 cell
I have been using VLookup in Excel 2003 for some time but I would like to expand the VLookup results. Instead of just copying one cell to paste as the result of the formula, can I have VLookup copy and paste a series of cells from same row of the found item? Thanks and have a great day!!! :) You can change the result of the VLOOKUP function by changing the 3rd arguement in the function, which determines which column from the table to return. =VLOOKUP(Find_this,In_this_table,#_of_column_to_return,Closest_Match?) If you want to copy and paste this and have it adapt/change, u...

Go to cell #
Hello all, Is there a way to force a worksheet to always open in cell A1 regardless of what cell was active when the worksheet was saved. Sometimes different people save this worksheet with the cursor resting in different places, so it's annoying when it opens in some odd blank area. Any help on this is greatly appreciated. Thanks, -S Hi, You need to write a macro basically Private Sub Workbook_Open() Sheets("Sheet1").Activate Range("A1") End Sub This needs to be put in the ThisWorkbook object of the VBA Editor for your file. If this helps, pl...

resizing problems
I am using OpenGL in my MFC app. The problem is when I resize the window from the left or top border the whole scene of my OpenGL moves even before my OnPaint event handler is called and when my OnPaint is called after this it repaints the scene so this produces a flicker. If, however I resize the window from the right or bottom border this problem doen't occur. Can anybody please tell me what is happening? Thank you ...

Printing text and pictures on Office for Mac 2004
I am using Office for Mac 2004. When I tried to insert a picture in a word document and choose text wrap, it looks fine in word format. But when I clicked print prevview, I cannot see the picture, and I cannot print it. However, if I just insert a picture, there is no problem. I cannot use the wizard function to print envelope. I have to set my page in envelope format, and then type in details. I must have changed some settings by mistake, because I could do those things before. Can anyone help?? Check Word | Preferences | Print, and make sure "drawing objects" is check...

Counting only active cells
Is there a way to count back a certain number of active cells only (eg. 40 possible cells, only 28 are active), and then enter the lowest number within that range into a cell? What defines active?: -- HTH RP (remove nothere from the email address if mailing direct) "Sac73" <Sac73@discussions.microsoft.com> wrote in message news:207089F2-80B4-46C8-863D-A639CAD16155@microsoft.com... > Is there a way to count back a certain number of active cells only (eg. 40 > possible cells, only 28 are active), and then enter the lowest number within > that range into a cell? ...

Two formulas in on cell based on two numbers in another cell?
Hi, Not sure this is possible but...I have a cell that has a number range in it and based on an amount in another cell want to calculate a new range. For example: Initial Range: A1 = 10 - 12 Calc Amount: A2 = 5 Final Range: A3 = 50 - 60 I think I can get the results by concatenating two formulas I'm just not sure how to enter the original numbers (A1) or how to distinguish between the two in the final formula (A3) Using Excel 2003. Hope this makes sense. Thanks. I would put the range in two different cells (eg A1 and B1). Then the multiplication is easy. If you ...

Sheet change event to return sheet name just left
Does anyone have any idea how I can get the name of a worksheet that I have just moved from. So if I am in Sheet1 and move to Sheet2, how do I get a macro to return Sheet1. In all the Events I have looked at they all return the name of the sheet that I have moved to not the sheet I have left. Any help will be gratefully received -- with kind regards Spike We need to remember it. In a standard module: Public OldSheet As String Public NewSheet As String In the worksheet code area of every sheet: Private Sub Worksheet_Activate() If IsEmpty(OldSheet) Then OldShe...

Bitmap resize on same DC
I am a little be confused! I have a custom control with a bitmap inside I create the bitmap with this code ************************************************* CClientDC dc(this) ; if (m_dcGrid.GetSafeHdc() == NULL) { m_dcGrid.CreateCompatibleDC(&dc) ; m_bitmapGrid.CreateCompatibleBitmap(&dc, m_nClientWidth,m_nClientHeight) ; m_pbitmapOldGrid = m_dcGrid.SelectObject(&m_bitmapGrid) ; } ************************************************ and in OnPaint i have: ************************************************ CPaintDC dc(this) ; // device context for painting CDC memDC ; CBit...

Show a grid pattern not corresponding to the cell sizes
I would like to have a standard grid pattern appear on a spreadsheet that has varying cell sizes. I would like to place this pattern in a specific area, even though the cell sizes in this area vary in width. If there is a way to insert the pattern as an image or object and 'send to back', that would be fantastic. I'm using Excel 2003 in the Office Professional Edition 2003. ...

CStatic derived dialog and auto-resize
Hi, I would like to add auto-resizing feature to my Cstatic derived control. I mean when I load a bitmap I would like to adjust size dynamically. I tried to SendMessage WM_SIZE but it doesn't work. >I would like to add auto-resizing feature to my Cstatic derived control. I >mean when I load a bitmap I would like to adjust size >dynamically. >I tried to SendMessage WM_SIZE but it doesn't work. You can resize a window by using the SetWindowPos or MoveWindow APIs. Dave -- MVP VC++ FAQ: http://www.mvps.org/vcfaq ...

coping cell contains to different cells
I am running Excel 2007 If I have 3 words in cell A1 all separated by a blank space, how can I copy the 1st word to A2, 2nd word to A3, and the 3rd word to cell A4...? I have a 1,000 rows to do. Thanks... Select A1 to A1000, click text to Columns TK wrote: > I am running Excel 2007 > If I have 3 words in cell A1 all separated by a blank space, how can I > copy the 1st word to A2, 2nd word to A3, and the 3rd word to cell A4...? > I have a 1,000 rows to do. > Thanks... You're the best...! "Bob I" <birelan@yahoo.com> wrote in message ...

show active cell
Hi I want to show the contents i the active cell in another cell, fo example cell A1. Also when i change active cell. dalla -- Message posted from http://www.ExcelForum.com Hi, Not sure what you mean exactly. But if you want B1 to always show wha A1 has, in B1 type ... =A1 Is that what you're looking for -- Message posted from http://www.ExcelForum.com One way: Put this in the worksheet code module (right-click the worksheet tab and choose View Code): Private Sub Worksheet_SelectionChange( _ ByVal Target As Excel.Range) Range("A1").Value = ...

Enter key moves to cell below current, not to beginning of data entry location
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I have a spreadsheet in which I am entering data, one line at a time, using tab to move to the next cell as I go. At the end of the data set, I hit Enter to return to the beginning of the next line - except Excel is moving me to the first cell directly below the last cell I selected. <br><br>For example, if I add data to cells A1 - D1, then hit Enter, instead of going to A2 as expected I end up in D2. I have no idea why this is happening. It doesn't happen with any new files I open, it's just...

Empty string in query calc returns no result
Hi all I've got a query that isn't returning the result I need. The query is: SELECT Str$([QuoteNo])+[SupplementaryID] AS Quote, Quotes.RecordID FROM Quotes QuoteNo is always populated, but SupplementaryID isn't, sometimes it's an empty string. The data in the table looks like this QuoteNo SupplementaryID RecordID 1000 1 1000 A 2 1000 B 3 The results I want are: 1000 1 1000A 2 1000B 3 What I get is ...

auto resize text without resizing cell in excel
format|cells|alignment tab|check "shrink to fit" Ferd wrote: -- Dave Peterson ...

How do i count the number of conditional formatted cells?
I want to count the frequency of a number in a series of numbers possibly using a count if or lookup function. I wish the total number to be displayed at the bottom, how can i do this? Kate Your subject line reads "count the number of conditional formatted cells". You would need VBA to count CF cells. http://www.cpearson.com/excel/CFColors.htm If the subject was not correct, you could use the FREQUENCY Function to return the frequency of numbers in a range. Or COUNTIF to return the total number of times a number apears in a range. =COUNTIF(A1:A100,34) where 34 is the numbe...

CDialog Problem pulling Text into CString
I have a dialog set up that I simply use to pull a description to search for. I used the class wizard to set all of this up. IDD_TEXT1 (text box) I assigned the variable... CString m_strText to the Resource using the wizard. There is no length validation or anything assigned to it other than "tab stop". When I try and pull the data all I am getting is the first byte. I can popluate the text box using the data exchange and it populates fine. However if I even pull that data back in I get only the first byte of data. Any Ideas.... I am stumped. are you using the UpdateD...