Results 1 to 2 of 2

Thread: Excel 2003 Cell X1 Y1 merge.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    90

    Excel 2003 Cell X1 Y1 merge.

    Hello there,

    I have a list of excel columns to present my questionnaire questions.
    note: ms excel 2003.

    for eg, i have two columns x and y. at the first cell of each column, a label is required. unfortunately column x and y are to share a single label, i would like to merge the first cell of each column into a single cell in order to accomodate the one particular label.


    VB Code:
    1. e = 152
    2. g = 400
    3.  
    4.  For i = 0 To UBound(resultString)
    5.                      '   .Checkboxes.Add(g, e, 80, 10).Text = d
    6.                      
    7.                      
    8.                      Set chk = .Checkboxes.Add(g, e, 80, 10)
    9.                         chk.Text = d
    10.                         chk.Name = "Q" & h & "chkbox" & chkbox & "Ans" & An
    11.                        
    12.                         .Cells(k, 25).Formula = chkbox
    13.                        
    14.                         g = g + 50
    15.                         chkbox = chkbox + 1
    16.  Next
    17.                    
    18.                 End If
    19.                    
    20.                 e = e + 12.5

    _________
    | |
    | L a b e l |
    |________|
    | X | Y |
    |---------|
    | 1 | 2 |
    |---------|
    | 3 | 4 |
    -----------


    Astro

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Excel 2003 Cell X1 Y1 merge.

    have the sheet ready.
    Tools>Macro>record
    (got through until it is ready to record your clicks)
    Select the two cells.
    Cell Format.
    Change to merge cells and any other options/colours.
    Stop recording.
    Check the code and change it (subtly) to fit with your code.

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width