+ Reply to Thread
Results 1 to 3 of 3

fill down multiple cells in the same column

  1. #1
    Jerome
    Guest

    fill down multiple cells in the same column

    Good day,

    Could someone please help me with the following. I want to fill down
    multiple cell contents within the same columns. There are over 12000 rows and
    the columns vary from 2 or more:

    A B
    1 abc 123
    2
    3
    4
    5 def
    6
    7
    8 ghi
    9
    10
    11 jkl
    12
    13
    14
    15 mno
    16
    17
    18
    19 pqr

    Thank you and best regards,

    Jerome





  2. #2
    Tom Ogilvy
    Guest

    RE: fill down multiple cells in the same column

    Assume the first row of the column will always contain a value

    The basic approach would be:
    Sub Fillspaces()
    Dim rng as Range, rng2 as Range
    set rng = Range("A1:B13000")
    set rng2 = rng.specialcells(xlBlanks)
    rng2.Formula = "=A1"
    rng.Formula = rng.Value
    End Sub

    obviously test this on a copy of your data.

    --
    regards,
    Tom Ogilvy


    "Jerome" wrote:

    > Good day,
    >
    > Could someone please help me with the following. I want to fill down
    > multiple cell contents within the same columns. There are over 12000 rows and
    > the columns vary from 2 or more:
    >
    > A B
    > 1 abc 123
    > 2
    > 3
    > 4
    > 5 def
    > 6
    > 7
    > 8 ghi
    > 9
    > 10
    > 11 jkl
    > 12
    > 13
    > 14
    > 15 mno
    > 16
    > 17
    > 18
    > 19 pqr
    >
    > Thank you and best regards,
    >
    > Jerome
    >
    >
    >
    >


  3. #3
    Bernie Deitrick
    Guest

    Re: fill down multiple cells in the same column

    Tom/Jerome,

    Perhaps more flexible is:

    rng2.FormulaR1C1 = "=R[-1]C"

    rather than

    rng2.Formula = "=A1"

    HTH,
    Bernie
    MS Excel MVP


    "Tom Ogilvy" <[email protected]> wrote in message
    news:[email protected]...
    > Assume the first row of the column will always contain a value
    >
    > The basic approach would be:
    > Sub Fillspaces()
    > Dim rng as Range, rng2 as Range
    > set rng = Range("A1:B13000")
    > set rng2 = rng.specialcells(xlBlanks)
    > rng2.Formula = "=A1"
    > rng.Formula = rng.Value
    > End Sub
    >
    > obviously test this on a copy of your data.
    >
    > --
    > regards,
    > Tom Ogilvy
    >
    >
    > "Jerome" wrote:
    >
    >> Good day,
    >>
    >> Could someone please help me with the following. I want to fill down
    >> multiple cell contents within the same columns. There are over 12000 rows and
    >> the columns vary from 2 or more:
    >>
    >> A B
    >> 1 abc 123
    >> 2
    >> 3
    >> 4
    >> 5 def
    >> 6
    >> 7
    >> 8 ghi
    >> 9
    >> 10
    >> 11 jkl
    >> 12
    >> 13
    >> 14
    >> 15 mno
    >> 16
    >> 17
    >> 18
    >> 19 pqr
    >>
    >> Thank you and best regards,
    >>
    >> Jerome
    >>
    >>
    >>
    >>




+ 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