+ Reply to Thread
Results 1 to 5 of 5

Display 2 formulas from source workbooks to destination workbooks

  1. #1
    Excel_seek_help
    Guest

    Display 2 formulas from source workbooks to destination workbooks

    In source workbook, value of cell 1 is 2*D5+45*C3. I also store 5+7*3*K7 in
    cell 2.

    How can I display 2*D5+45*C3+5+7*3*K7 in cell 3 of destination workbook. I
    am running on Excel 2003.

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    One way,

    Tools, Macro, Record New Macro
    and confirm the name you wish to use,

    Select the cell to copy and Copy,
    Select the sheet and cell to paste and Paste

    stop recording, (if you lose the stop, then Tools, Macro, Stop Recording)

    Then Tools, Macro, Macros, select the macro and Edit
    it should look like:

    Sub Macro2()
    '
    ' Macro2 Macro
    ' Macro recorded 26/04/2006 by
    '
    Range("A1").Select
    Selection.Copy
    Sheets("Sheet3").Select
    Range("A1").Select
    ActiveSheet.Paste
    Range("A1").Value = " ' " & Range("A1").Formula

    End Sub


    Just add the line shown in blue, and run the macro from the original sheet.

    This should help

    --

    Quote Originally Posted by Excel_seek_help
    In source workbook, value of cell 1 is 2*D5+45*C3. I also store 5+7*3*K7 in
    cell 2.

    How can I display 2*D5+45*C3+5+7*3*K7 in cell 3 of destination workbook. I
    am running on Excel 2003.

  3. #3
    Excel_seek_help
    Guest

    Re: Display 2 formulas from source workbooks to destination workbo

    Thx for your reply and I modified the macro as below to bring the values to
    Sheet3:

    In Source workbook Sheet 1 Cell A1, I entered 2*D5+45*C3
    In Source workbook Sheet 1 Cell B1, I entered 5+7*3*K7

    Sub Macro2()
    '
    ' Macro2 Macro
    ' Macro recorded 04-26-2006 by

    Range("a1:a2").Select
    Selection.Copy
    Sheets("Sheet3").Select
    Range("A1:a2").Select
    ActiveSheet.Paste
    Range("A1:a2").Value = "'" & Range("A1:a2").Formula
    End Sub

    Only Source workbook Sheet 1 Cell A1, I entered 2*D5+45*C3 copied to Sheet3
    A1. Source workbook Sheet 1 Cell B1, I entered 5+7*3*K7 did not copy to
    Sheet3 B2 as expected.

    Furthermore, what will be the next step to show Cell A1 as
    2*D5+45*C3+5+7*3*K7 in the Sheet3 or in NEW destination workbook.

    Appreciate your reply in advance.

    "Bryan Hessey" wrote:

    >
    > One way,
    >
    > Tools, Macro, Record New Macro
    > and confirm the name you wish to use,
    >
    > Select the cell to copy and Copy,
    > Select the sheet and cell to paste and Paste
    >
    > stop recording, (if you lose the stop, then Tools, Macro, Stop
    > Recording)
    >
    > Then Tools, Macro, Macros, select the macro and Edit
    > it should look like:
    >
    > Sub Macro2()
    > '
    > ' Macro2 Macro
    > ' Macro recorded 26/04/2006 by
    > '
    > Range("A1").Select
    > Selection.Copy
    > Sheets("Sheet3").Select
    > Range("A1").Select
    > ActiveSheet.Paste
    > - Range("A1").Value = " ' " & Range("A1").Formula-
    >
    > End Sub
    >
    >
    > Just add the line shown in blue, and run the macro from the original
    > sheet.
    >
    > This should help
    >
    > --
    >
    > Excel_seek_help Wrote:
    > > In source workbook, value of cell 1 is 2*D5+45*C3. I also store
    > > 5+7*3*K7 in
    > > cell 2.
    > >
    > > How can I display 2*D5+45*C3+5+7*3*K7 in cell 3 of destination
    > > workbook. I
    > > am running on Excel 2003.

    >
    >
    > --
    > Bryan Hessey
    > ------------------------------------------------------------------------
    > Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
    > View this thread: http://www.excelforum.com/showthread...hreadid=536195
    >
    >


  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Range("A1:a2").Value = "'" & Range("A1:a2").Formula is invalid,

    Sheets("Sheet3").Range("A1").Value = " ' " & Sheets("Sheet1").Range("A1").Formula & "+" & Sheets("Sheet1").Range("B1").Formula

    should work

    --

    Quote Originally Posted by Excel_seek_help
    Thx for your reply and I modified the macro as below to bring the values to
    Sheet3:

    In Source workbook Sheet 1 Cell A1, I entered 2*D5+45*C3
    In Source workbook Sheet 1 Cell B1, I entered 5+7*3*K7

    Sub Macro2()
    '
    ' Macro2 Macro
    ' Macro recorded 04-26-2006 by

    Range("a1:a2").Select
    Selection.Copy
    Sheets("Sheet3").Select
    Range("A1:a2").Select
    ActiveSheet.Paste
    Range("A1:a2").Value = "'" & Range("A1:a2").Formula
    End Sub

    Only Source workbook Sheet 1 Cell A1, I entered 2*D5+45*C3 copied to Sheet3
    A1. Source workbook Sheet 1 Cell B1, I entered 5+7*3*K7 did not copy to
    Sheet3 B2 as expected.

    Furthermore, what will be the next step to show Cell A1 as
    2*D5+45*C3+5+7*3*K7 in the Sheet3 or in NEW destination workbook.

    Appreciate your reply in advance.

    "Bryan Hessey" wrote:

    >
    > One way,
    >
    > Tools, Macro, Record New Macro
    > and confirm the name you wish to use,
    >
    > Select the cell to copy and Copy,
    > Select the sheet and cell to paste and Paste
    >
    > stop recording, (if you lose the stop, then Tools, Macro, Stop
    > Recording)
    >
    > Then Tools, Macro, Macros, select the macro and Edit
    > it should look like:
    >
    > Sub Macro2()
    > '
    > ' Macro2 Macro
    > ' Macro recorded 26/04/2006 by
    > '
    > Range("A1").Select
    > Selection.Copy
    > Sheets("Sheet3").Select
    > Range("A1").Select
    > ActiveSheet.Paste
    > - Range("A1").Value = " ' " & Range("A1").Formula-
    >
    > End Sub
    >
    >
    > Just add the line shown in blue, and run the macro from the original
    > sheet.
    >
    > This should help
    >
    > --
    >
    > Excel_seek_help Wrote:
    > > In source workbook, value of cell 1 is 2*D5+45*C3. I also store
    > > 5+7*3*K7 in
    > > cell 2.
    > >
    > > How can I display 2*D5+45*C3+5+7*3*K7 in cell 3 of destination
    > > workbook. I
    > > am running on Excel 2003.

    >
    >
    > --
    > Bryan Hessey
    > ------------------------------------------------------------------------
    > Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
    > View this thread: http://www.excelforum.com/showthread...hreadid=536195
    >
    >

  5. #5
    Excel_seek_help
    Guest

    Re: Display 2 formulas from source workbooks to destination workbo

    Thx. It works.

    "Bryan Hessey" wrote:

    >
    > Range("A1:a2").Value = "'" & Range("A1:a2").Formula is invalid,
    >
    > Sheets("Sheet3").Range("A1").Value = " ' " &
    > Sheets("Sheet1").Range("A1").Formula & "+" &
    > Sheets("Sheet1").Range("B1").Formula
    >
    > should work
    >
    > --
    >
    > Excel_seek_help Wrote:
    > > Thx for your reply and I modified the macro as below to bring the values
    > > to
    > > Sheet3:
    > >
    > > In Source workbook Sheet 1 Cell A1, I entered 2*D5+45*C3
    > > In Source workbook Sheet 1 Cell B1, I entered 5+7*3*K7
    > >
    > > Sub Macro2()
    > > '
    > > ' Macro2 Macro
    > > ' Macro recorded 04-26-2006 by
    > >
    > > Range("a1:a2").Select
    > > Selection.Copy
    > > Sheets("Sheet3").Select
    > > Range("A1:a2").Select
    > > ActiveSheet.Paste
    > > Range("A1:a2").Value = "'" & Range("A1:a2").Formula
    > > End Sub
    > >
    > > Only Source workbook Sheet 1 Cell A1, I entered 2*D5+45*C3 copied to
    > > Sheet3
    > > A1. Source workbook Sheet 1 Cell B1, I entered 5+7*3*K7 did not copy
    > > to
    > > Sheet3 B2 as expected.
    > >
    > > Furthermore, what will be the next step to show Cell A1 as
    > > 2*D5+45*C3+5+7*3*K7 in the Sheet3 or in NEW destination workbook.
    > >
    > > Appreciate your reply in advance.
    > >
    > > "Bryan Hessey" wrote:
    > >
    > > >
    > > > One way,
    > > >
    > > > Tools, Macro, Record New Macro
    > > > and confirm the name you wish to use,
    > > >
    > > > Select the cell to copy and Copy,
    > > > Select the sheet and cell to paste and Paste
    > > >
    > > > stop recording, (if you lose the stop, then Tools, Macro, Stop
    > > > Recording)
    > > >
    > > > Then Tools, Macro, Macros, select the macro and Edit
    > > > it should look like:
    > > >
    > > > Sub Macro2()
    > > > '
    > > > ' Macro2 Macro
    > > > ' Macro recorded 26/04/2006 by
    > > > '
    > > > Range("A1").Select
    > > > Selection.Copy
    > > > Sheets("Sheet3").Select
    > > > Range("A1").Select
    > > > ActiveSheet.Paste
    > > > - Range("A1").Value = " ' " & Range("A1").Formula-
    > > >
    > > > End Sub
    > > >
    > > >
    > > > Just add the line shown in blue, and run the macro from the original
    > > > sheet.
    > > >
    > > > This should help
    > > >
    > > > --
    > > >
    > > > Excel_seek_help Wrote:
    > > > > In source workbook, value of cell 1 is 2*D5+45*C3. I also store
    > > > > 5+7*3*K7 in
    > > > > cell 2.
    > > > >
    > > > > How can I display 2*D5+45*C3+5+7*3*K7 in cell 3 of destination
    > > > > workbook. I
    > > > > am running on Excel 2003.
    > > >
    > > >
    > > > --
    > > > Bryan Hessey
    > > >

    > > ------------------------------------------------------------------------
    > > > Bryan Hessey's Profile:

    > > http://www.excelforum.com/member.php...o&userid=21059
    > > > View this thread:

    > > http://www.excelforum.com/showthread...hreadid=536195
    > > >
    > > >

    >
    >
    > --
    > Bryan Hessey
    > ------------------------------------------------------------------------
    > Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
    > View this thread: http://www.excelforum.com/showthread...hreadid=536195
    >
    >


+ 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