+ Reply to Thread
Results 1 to 3 of 3

Fill in Formulas

  1. #1
    snax500
    Guest

    Fill in Formulas

    In Excel2000, I have the following formulas:

    A B c
    1
    2 +B2
    3 +C2
    4
    5
    6
    7

    I want to create a macro to select a range (say A4:A20) that will look
    at the previous row's formula and add one column to column reference.
    My output will then look like:

    A B c
    1
    2 +B2
    3 +C2
    4 +D2
    5 +E2
    6 +F2
    7 +G2
    etc, etc.

    Any ideas?

    Thanks


  2. #2
    Tom Ogilvy
    Guest

    Re: Fill in Formulas

    for each cell in selection
    cell.formula = "+" & cells(2,cell.row).Address(0,0)
    Next

    --
    Regards,
    Tom Ogilvy

    "snax500" <[email protected]> wrote in message
    news:[email protected]...
    > In Excel2000, I have the following formulas:
    >
    > A B c
    > 1
    > 2 +B2
    > 3 +C2
    > 4
    > 5
    > 6
    > 7
    >
    > I want to create a macro to select a range (say A4:A20) that will look
    > at the previous row's formula and add one column to column reference.
    > My output will then look like:
    >
    > A B c
    > 1
    > 2 +B2
    > 3 +C2
    > 4 +D2
    > 5 +E2
    > 6 +F2
    > 7 +G2
    > etc, etc.
    >
    > Any ideas?
    >
    > Thanks
    >




  3. #3
    Bob Phillips
    Guest

    Re: Fill in Formulas

    Why use a macro

    in A2, use

    =INDEX($2:$2,1,ROW())

    and copy down

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "snax500" <[email protected]> wrote in message
    news:[email protected]...
    > In Excel2000, I have the following formulas:
    >
    > A B c
    > 1
    > 2 +B2
    > 3 +C2
    > 4
    > 5
    > 6
    > 7
    >
    > I want to create a macro to select a range (say A4:A20) that will look
    > at the previous row's formula and add one column to column reference.
    > My output will then look like:
    >
    > A B c
    > 1
    > 2 +B2
    > 3 +C2
    > 4 +D2
    > 5 +E2
    > 6 +F2
    > 7 +G2
    > etc, etc.
    >
    > Any ideas?
    >
    > Thanks
    >




+ 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