+ Reply to Thread
Results 1 to 9 of 9

Pulling data from another WS

  1. #1
    Darko
    Guest

    Pulling data from another WS

    Hi,

    I am trying to pull data from a ws in the same workbook, everything is ok
    untill i try to create a macro that will do this automatically. The poblem is
    when I try to pull a name, it gives me the cell reference instead of the
    name. Please direct me in any way...



  2. #2
    michaelberrier
    Guest

    RE: Pulling data from another WS

    Post your code so we can see where the problem is.

    "Darko" wrote:

    > Hi,
    >
    > I am trying to pull data from a ws in the same workbook, everything is ok
    > untill i try to create a macro that will do this automatically. The poblem is
    > when I try to pull a name, it gives me the cell reference instead of the
    > name. Please direct me in any way...
    >
    >


  3. #3
    Darko
    Guest

    RE: Pulling data from another WS

    How do I post my code?

    "michaelberrier" wrote:

    > Post your code so we can see where the problem is.
    >
    > "Darko" wrote:
    >
    > > Hi,
    > >
    > > I am trying to pull data from a ws in the same workbook, everything is ok
    > > untill i try to create a macro that will do this automatically. The poblem is
    > > when I try to pull a name, it gives me the cell reference instead of the
    > > name. Please direct me in any way...
    > >
    > >


  4. #4
    michaelberrier
    Guest

    RE: Pulling data from another WS

    Copy and paste your code into the group

    "Darko" wrote:

    > How do I post my code?
    >
    > "michaelberrier" wrote:
    >
    > > Post your code so we can see where the problem is.
    > >
    > > "Darko" wrote:
    > >
    > > > Hi,
    > > >
    > > > I am trying to pull data from a ws in the same workbook, everything is ok
    > > > untill i try to create a macro that will do this automatically. The poblem is
    > > > when I try to pull a name, it gives me the cell reference instead of the
    > > > name. Please direct me in any way...
    > > >
    > > >


  5. #5
    Darko
    Guest

    RE: Pulling data from another WS

    Sub Macro22()
    '
    ' Macro22 Macro
    ' Macro recorded 6/27/2006 by Darko Naumoski
    '

    '
    Sheets("DiscStmt").Select
    Range("D12").Select
    ActiveCell.FormulaR1C1 = "=Customers!A18"
    Range("H16").Select
    ActiveCell.FormulaR1C1 = "=Customers!R[2]C[-5]"
    Range("H18").Select
    ActiveCell.FormulaR1C1 = "=Customers!RC[-3]"
    Range("H19").Select
    Sheets("Customers").Select
    End Sub

    I didnt realize you were talking about the macro code.

    ActiveCell.FormulaR1C1 = "=Customers!A18" is coming up w/ =Customers!A18
    instead of a name of a customer.

    Thank you...

    "michaelberrier" wrote:

    > Copy and paste your code into the group
    >
    > "Darko" wrote:
    >
    > > How do I post my code?
    > >
    > > "michaelberrier" wrote:
    > >
    > > > Post your code so we can see where the problem is.
    > > >
    > > > "Darko" wrote:
    > > >
    > > > > Hi,
    > > > >
    > > > > I am trying to pull data from a ws in the same workbook, everything is ok
    > > > > untill i try to create a macro that will do this automatically. The poblem is
    > > > > when I try to pull a name, it gives me the cell reference instead of the
    > > > > name. Please direct me in any way...
    > > > >
    > > > >


  6. #6
    michaelberrier
    Guest

    RE: Pulling data from another WS

    You've put an = inside the quotes, therefore Excel thinks you're talking
    about the statement as text instead of a reference. Get rid of the quotes and
    the extra = and that should fix it up.

    "Darko" wrote:

    > Sub Macro22()
    > '
    > ' Macro22 Macro
    > ' Macro recorded 6/27/2006 by Darko Naumoski
    > '
    >
    > '
    > Sheets("DiscStmt").Select
    > Range("D12").Select
    > ActiveCell.FormulaR1C1 = "=Customers!A18"
    > Range("H16").Select
    > ActiveCell.FormulaR1C1 = "=Customers!R[2]C[-5]"
    > Range("H18").Select
    > ActiveCell.FormulaR1C1 = "=Customers!RC[-3]"
    > Range("H19").Select
    > Sheets("Customers").Select
    > End Sub
    >
    > I didnt realize you were talking about the macro code.
    >
    > ActiveCell.FormulaR1C1 = "=Customers!A18" is coming up w/ =Customers!A18
    > instead of a name of a customer.
    >
    > Thank you...
    >
    > "michaelberrier" wrote:
    >
    > > Copy and paste your code into the group
    > >
    > > "Darko" wrote:
    > >
    > > > How do I post my code?
    > > >
    > > > "michaelberrier" wrote:
    > > >
    > > > > Post your code so we can see where the problem is.
    > > > >
    > > > > "Darko" wrote:
    > > > >
    > > > > > Hi,
    > > > > >
    > > > > > I am trying to pull data from a ws in the same workbook, everything is ok
    > > > > > untill i try to create a macro that will do this automatically. The poblem is
    > > > > > when I try to pull a name, it gives me the cell reference instead of the
    > > > > > name. Please direct me in any way...
    > > > > >
    > > > > >


  7. #7
    Darko
    Guest

    RE: Pulling data from another WS

    Taking the quotation marks off and the equal sign triggers the debuger, so i
    put in the quotations back on and it produced the same result. Any other
    suggestions?
    Just a thought, why the other two cells that are pulling numbers are working
    just fine?

    Thanks for your time already spent...

    Darko

    "michaelberrier" wrote:

    > You've put an = inside the quotes, therefore Excel thinks you're talking
    > about the statement as text instead of a reference. Get rid of the quotes and
    > the extra = and that should fix it up.
    >
    > "Darko" wrote:
    >
    > > Sub Macro22()
    > > '
    > > ' Macro22 Macro
    > > ' Macro recorded 6/27/2006 by Darko Naumoski
    > > '
    > >
    > > '
    > > Sheets("DiscStmt").Select
    > > Range("D12").Select
    > > ActiveCell.FormulaR1C1 = "=Customers!A18"
    > > Range("H16").Select
    > > ActiveCell.FormulaR1C1 = "=Customers!R[2]C[-5]"
    > > Range("H18").Select
    > > ActiveCell.FormulaR1C1 = "=Customers!RC[-3]"
    > > Range("H19").Select
    > > Sheets("Customers").Select
    > > End Sub
    > >
    > > I didnt realize you were talking about the macro code.
    > >
    > > ActiveCell.FormulaR1C1 = "=Customers!A18" is coming up w/ =Customers!A18
    > > instead of a name of a customer.
    > >
    > > Thank you...
    > >
    > > "michaelberrier" wrote:
    > >
    > > > Copy and paste your code into the group
    > > >
    > > > "Darko" wrote:
    > > >
    > > > > How do I post my code?
    > > > >
    > > > > "michaelberrier" wrote:
    > > > >
    > > > > > Post your code so we can see where the problem is.
    > > > > >
    > > > > > "Darko" wrote:
    > > > > >
    > > > > > > Hi,
    > > > > > >
    > > > > > > I am trying to pull data from a ws in the same workbook, everything is ok
    > > > > > > untill i try to create a macro that will do this automatically. The poblem is
    > > > > > > when I try to pull a name, it gives me the cell reference instead of the
    > > > > > > name. Please direct me in any way...
    > > > > > >
    > > > > > >


  8. #8
    michaelberrier
    Guest

    RE: Pulling data from another WS

    I'm not sure that the R1C1 part of your formula is necessary at all. Lets
    give this a try:
    Sheets("DiscStmt").Select
    Range("D12") = Sheets("Customers").Range("A18"
    ...and so forth. I can't figure out which cells you refer to in these last
    two lines, but you should be able to reference them the same way.

    ActiveCell.FormulaR1C1 = "=Customers!R[2]C[-5]"
    Range("H18").Select
    ActiveCell.FormulaR1C1 = "=Customers!RC[-3]"
    Range("H19").Select
    Sheets("Customers").Select
    End Sub

    "Darko" wrote:

    > Taking the quotation marks off and the equal sign triggers the debuger, so i
    > put in the quotations back on and it produced the same result. Any other
    > suggestions?
    > Just a thought, why the other two cells that are pulling numbers are working
    > just fine?
    >
    > Thanks for your time already spent...
    >
    > Darko
    >
    > "michaelberrier" wrote:
    >
    > > You've put an = inside the quotes, therefore Excel thinks you're talking
    > > about the statement as text instead of a reference. Get rid of the quotes and
    > > the extra = and that should fix it up.
    > >
    > > "Darko" wrote:
    > >
    > > > Sub Macro22()
    > > > '
    > > > ' Macro22 Macro
    > > > ' Macro recorded 6/27/2006 by Darko Naumoski
    > > > '
    > > >
    > > > '
    > > > Sheets("DiscStmt").Select
    > > > Range("D12").Select
    > > > ActiveCell.FormulaR1C1 = "=Customers!A18"
    > > > Range("H16").Select
    > > > ActiveCell.FormulaR1C1 = "=Customers!R[2]C[-5]"
    > > > Range("H18").Select
    > > > ActiveCell.FormulaR1C1 = "=Customers!RC[-3]"
    > > > Range("H19").Select
    > > > Sheets("Customers").Select
    > > > End Sub
    > > >
    > > > I didnt realize you were talking about the macro code.
    > > >
    > > > ActiveCell.FormulaR1C1 = "=Customers!A18" is coming up w/ =Customers!A18
    > > > instead of a name of a customer.
    > > >
    > > > Thank you...
    > > >
    > > > "michaelberrier" wrote:
    > > >
    > > > > Copy and paste your code into the group
    > > > >
    > > > > "Darko" wrote:
    > > > >
    > > > > > How do I post my code?
    > > > > >
    > > > > > "michaelberrier" wrote:
    > > > > >
    > > > > > > Post your code so we can see where the problem is.
    > > > > > >
    > > > > > > "Darko" wrote:
    > > > > > >
    > > > > > > > Hi,
    > > > > > > >
    > > > > > > > I am trying to pull data from a ws in the same workbook, everything is ok
    > > > > > > > untill i try to create a macro that will do this automatically. The poblem is
    > > > > > > > when I try to pull a name, it gives me the cell reference instead of the
    > > > > > > > name. Please direct me in any way...
    > > > > > > >
    > > > > > > >


  9. #9
    Darko
    Guest

    RE: Pulling data from another WS

    Well, I found a way to somehow get it done. Plus I am recording the macros in
    Excel, not wrtiting them in VB, that's way over my head. I really do
    appreciate the help.

    Thank you.

    Darko

    "michaelberrier" wrote:

    > I'm not sure that the R1C1 part of your formula is necessary at all. Lets
    > give this a try:
    > Sheets("DiscStmt").Select
    > Range("D12") = Sheets("Customers").Range("A18"
    > ..and so forth. I can't figure out which cells you refer to in these last
    > two lines, but you should be able to reference them the same way.
    >
    > ActiveCell.FormulaR1C1 = "=Customers!R[2]C[-5]"
    > Range("H18").Select
    > ActiveCell.FormulaR1C1 = "=Customers!RC[-3]"
    > Range("H19").Select
    > Sheets("Customers").Select
    > End Sub
    >
    > "Darko" wrote:
    >
    > > Taking the quotation marks off and the equal sign triggers the debuger, so i
    > > put in the quotations back on and it produced the same result. Any other
    > > suggestions?
    > > Just a thought, why the other two cells that are pulling numbers are working
    > > just fine?
    > >
    > > Thanks for your time already spent...
    > >
    > > Darko
    > >
    > > "michaelberrier" wrote:
    > >
    > > > You've put an = inside the quotes, therefore Excel thinks you're talking
    > > > about the statement as text instead of a reference. Get rid of the quotes and
    > > > the extra = and that should fix it up.
    > > >
    > > > "Darko" wrote:
    > > >
    > > > > Sub Macro22()
    > > > > '
    > > > > ' Macro22 Macro
    > > > > ' Macro recorded 6/27/2006 by Darko Naumoski
    > > > > '
    > > > >
    > > > > '
    > > > > Sheets("DiscStmt").Select
    > > > > Range("D12").Select
    > > > > ActiveCell.FormulaR1C1 = "=Customers!A18"
    > > > > Range("H16").Select
    > > > > ActiveCell.FormulaR1C1 = "=Customers!R[2]C[-5]"
    > > > > Range("H18").Select
    > > > > ActiveCell.FormulaR1C1 = "=Customers!RC[-3]"
    > > > > Range("H19").Select
    > > > > Sheets("Customers").Select
    > > > > End Sub
    > > > >
    > > > > I didnt realize you were talking about the macro code.
    > > > >
    > > > > ActiveCell.FormulaR1C1 = "=Customers!A18" is coming up w/ =Customers!A18
    > > > > instead of a name of a customer.
    > > > >
    > > > > Thank you...
    > > > >
    > > > > "michaelberrier" wrote:
    > > > >
    > > > > > Copy and paste your code into the group
    > > > > >
    > > > > > "Darko" wrote:
    > > > > >
    > > > > > > How do I post my code?
    > > > > > >
    > > > > > > "michaelberrier" wrote:
    > > > > > >
    > > > > > > > Post your code so we can see where the problem is.
    > > > > > > >
    > > > > > > > "Darko" wrote:
    > > > > > > >
    > > > > > > > > Hi,
    > > > > > > > >
    > > > > > > > > I am trying to pull data from a ws in the same workbook, everything is ok
    > > > > > > > > untill i try to create a macro that will do this automatically. The poblem is
    > > > > > > > > when I try to pull a name, it gives me the cell reference instead of the
    > > > > > > > > name. Please direct me in any way...
    > > > > > > > >
    > > > > > > > >


+ 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