ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   What am I doing wrong, here? (https://www.excelbanter.com/excel-programming/353572-what-am-i-doing-wrong-here.html)

Jim May

What am I doing wrong, here?
 
On Sheet1 (activesheet) I have numbers in Range B1:C200.

In the immediate window I've entered:

Activesheet.Range("A:A").Formula = (Range("B1:B200") * Range("C1:C200"))

When I press enter I get a run-time error 13, type mismatch
Noting gets into Col A (which shoud be the product of
B * C (according to each row.

What am I doing wrong?






Jason Zischke

What am I doing wrong, here?
 
Try Putting this into the Immediate Window:
x = 1
Do Until x = 201
Activesheet.Cells(x, 1).Formula = "=Sum(B1:B200)*Sum(C1:C200)"
x = x + 1
Loop

Jason Zischke

"Jim May" wrote:

On Sheet1 (activesheet) I have numbers in Range B1:C200.

In the immediate window I've entered:

Activesheet.Range("A:A").Formula = (Range("B1:B200") * Range("C1:C200"))

When I press enter I get a run-time error 13, type mismatch
Noting gets into Col A (which shoud be the product of
B * C (according to each row.

What am I doing wrong?







Jason Zischke

What am I doing wrong, here?
 
Sorry Jim This will work much better in your Immediate window :

Activesheet.Range("A:A").Formula ="=Sum(B1:B200)*Sum(C1:C200)"

Jason Zischke

"Jason Zischke" wrote:

Try Putting this into the Immediate Window:
x = 1
Do Until x = 201
Activesheet.Cells(x, 1).Formula = "=Sum(B1:B200)*Sum(C1:C200)"
x = x + 1
Loop

Jason Zischke

"Jim May" wrote:

On Sheet1 (activesheet) I have numbers in Range B1:C200.

In the immediate window I've entered:

Activesheet.Range("A:A").Formula = (Range("B1:B200") * Range("C1:C200"))

When I press enter I get a run-time error 13, type mismatch
Noting gets into Col A (which shoud be the product of
B * C (according to each row.

What am I doing wrong?







Jim May

What am I doing wrong, here?
 
After a good nights sleep I tried:
activesheet.range("A:A").formula = "=b1*c1"

That's Cool......


"Jim May" wrote in message
news:zsaJf.4713$Tf3.3542@dukeread09...
On Sheet1 (activesheet) I have numbers in Range B1:C200.

In the immediate window I've entered:

Activesheet.Range("A:A").Formula = (Range("B1:B200") * Range("C1:C200"))

When I press enter I get a run-time error 13, type mismatch
Noting gets into Col A (which shoud be the product of
B * C (according to each row.

What am I doing wrong?









All times are GMT +1. The time now is 03:51 PM.

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