ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pulling data from another WS (https://www.excelbanter.com/excel-programming/365529-pulling-data-another-ws.html)

Darko

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...



michaelberrier[_2_]

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...



Darko

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...



michaelberrier[_2_]

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...



Darko

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...



michaelberrier[_2_]

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...



Darko

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...



michaelberrier[_2_]

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...



Darko

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...




All times are GMT +1. The time now is 06:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com