+ Reply to Thread
Results 1 to 4 of 4

Need VBA to move totals from one page to another

  1. #1
    Tina Bradshaw
    Guest

    Need VBA to move totals from one page to another

    I need to be able to move totals from page two in my workbook to page one.
    But if the cell in page one is already populated, I need VB to detect that
    and then move the total down on cell in the same column.

    How do i do that?

  2. #2
    bigwheel
    Guest

    RE: Need VBA to move totals from one page to another

    Hi Tina

    Presumably, this is one of your first attempts to get a macro to do
    something. Have you tried recording a new macro to "cut and paste" the cell
    from sheet2 to sheet1?

    Selection.Cut
    Sheets("Sheet1").Select
    Range("A1").Select
    ActiveSheet.Paste

    "Tina Bradshaw" wrote:

    > I need to be able to move totals from page two in my workbook to page one.
    > But if the cell in page one is already populated, I need VB to detect that
    > and then move the total down on cell in the same column.
    >
    > How do i do that?


  3. #3
    Tina Bradshaw
    Guest

    RE: Need VBA to move totals from one page to another

    I know about the recording - guess I should have been more specific. I am
    having problems getting it to move the totals if the orignal cell is already
    populated.

    "bigwheel" wrote:

    > Hi Tina
    >
    > Presumably, this is one of your first attempts to get a macro to do
    > something. Have you tried recording a new macro to "cut and paste" the cell
    > from sheet2 to sheet1?
    >
    > Selection.Cut
    > Sheets("Sheet1").Select
    > Range("A1").Select
    > ActiveSheet.Paste
    >
    > "Tina Bradshaw" wrote:
    >
    > > I need to be able to move totals from page two in my workbook to page one.
    > > But if the cell in page one is already populated, I need VB to detect that
    > > and then move the total down on cell in the same column.
    > >
    > > How do i do that?


  4. #4
    bigwheel
    Guest

    RE: Need VBA to move totals from one page to another

    In that case you could modify the recorded macro, in the case of the sample
    add these lines at the end

    If Range("A1") > "" Then ' cell has data in it
    Range("A2").Select ' select next cell
    ActiveSheet.Paste
    End If

    "Tina Bradshaw" wrote:

    > I know about the recording - guess I should have been more specific. I am
    > having problems getting it to move the totals if the orignal cell is already
    > populated.
    >
    > "bigwheel" wrote:
    >
    > > Hi Tina
    > >
    > > Presumably, this is one of your first attempts to get a macro to do
    > > something. Have you tried recording a new macro to "cut and paste" the cell
    > > from sheet2 to sheet1?
    > >
    > > Selection.Cut
    > > Sheets("Sheet1").Select
    > > Range("A1").Select
    > > ActiveSheet.Paste
    > >
    > > "Tina Bradshaw" wrote:
    > >
    > > > I need to be able to move totals from page two in my workbook to page one.
    > > > But if the cell in page one is already populated, I need VB to detect that
    > > > and then move the total down on cell in the same column.
    > > >
    > > > How do i do that?


+ 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