Invalid qualifier error bugging me

T

Tom McNulty

i am trying to copy a memory variable in excel sio I can
use it later but for some reason it will not copy.

myvar = Range("C6").Select
myvar=myvar*12
myvar.Copy ' this generates an IQ Error

Range("D15").Select
ActiveSheet.Paste

Any ideas?

Tom
 
F

Frank Kabel

Hi Tom
try the following
sub foo()
Dim myVar
myvar = Activesheet("C6").value
Activesheet("D6").value = myvar
end sub
 
H

Harald Staff

Hi Tom

You have lots of syntax and datatype errors in your posted code. Assuming
that C15 contains a numeric value and you want D15 to be 12 times as big and
formula-less, this is all you need:

Range("D15").Value = Range("C15").Value * 12
 
T

Tom McNulty

I need to be able to take the contents of a cell, perform
a series of calculations and then spit the result into a
cell


like myvar = cell a2

myvar = myvar & " is working " & cell a7 & " Hours each
day"


cell b5 = myvar

I can do it in VB but Excell has me stumpedf with this IQ
problem
 
K

kkknie

Maybe I'm missing something, but wouldn't this do the trick?

Range("B5").Value = Range("A2").Value & " is working " &
Range("A7").Value & " Hours each day"

K
 
Top