+ Reply to Thread
Results 1 to 3 of 3

width of Merged cells within un merged cells

  1. #1
    Darin Kramer
    Guest

    width of Merged cells within un merged cells


    Another one..
    Assume cells e1,f1,g1 are merged (as are e2,f2,g2) up to e100
    Same thing with cells in columns i,j,k
    Cells in the inbetween columns are NOT merged.

    I want to create a macro to size column width to 15 (each) of merged
    cells in column e,f,g.
    If I manually select the column in excel, I can do it.(ie click on the
    column letter)
    If I try to write basic VB to do (see below) it expands my column
    selection to the entire data iin the sheet(cols a - k) and then applies
    the column width to all of these columns (which I dont want)
    Unfortunately I cant unmerge the cols

    Any ideas???

    Basic VB im using:

    Columns("E:G").Select
    Selection.ColumnWidth = 15


    *** Sent via Developersdex http://www.developersdex.com ***

  2. #2
    Bernie Deitrick
    Guest

    Re: width of Merged cells within un merged cells

    Darin,

    Columns("E:G").ColumnWidth = 15

    worked for me....

    --
    HTH,
    Bernie
    MS Excel MVP


    "Darin Kramer" <darin_kramer@hotmail.com> wrote in message
    news:ueGWzCIuFHA.2948@TK2MSFTNGP15.phx.gbl...
    >
    > Another one..
    > Assume cells e1,f1,g1 are merged (as are e2,f2,g2) up to e100
    > Same thing with cells in columns i,j,k
    > Cells in the inbetween columns are NOT merged.
    >
    > I want to create a macro to size column width to 15 (each) of merged
    > cells in column e,f,g.
    > If I manually select the column in excel, I can do it.(ie click on the
    > column letter)
    > If I try to write basic VB to do (see below) it expands my column
    > selection to the entire data iin the sheet(cols a - k) and then applies
    > the column width to all of these columns (which I dont want)
    > Unfortunately I cant unmerge the cols
    >
    > Any ideas???
    >
    > Basic VB im using:
    >
    > Columns("E:G").Select
    > Selection.ColumnWidth = 15
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***




  3. #3
    Darin Kramer
    Guest

    Re: width of Merged cells within un merged cells


    Thanks Bernie,

    Works for me too now!


    *** Sent via Developersdex http://www.developersdex.com ***

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1