View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.misc
Gunti Gunti is offline
external usenet poster
 
Posts: 58
Default Simple Macro Question

Thanks alot both of you, for trying to help! I'm not getting it however. When
i use this:

m = Worksheets("Invulblad").Range("AA47").Value
Range("M45").Formula = "'=M43 * " & m & ""

The result is that i just see a number in cell M45 (175,-)

The result i want is indeed 175, but i want people to actually see that it
is Cell M43*0.05 (in this case AA47 = 0.05)

I've tried both options you guys gave, can't thank you enough for taking the
time to helping me anyway ;)

Gunti



"Gary''s Student" wrote:

If the goal is to have the macro create an equation:

Sub gunti()
v = Worksheets("Invulblad").Range("AA47").Value
Range("L45").Formula = "=" & v & "*L43"
End Sub

--
Gary''s Student - gsnu200820


"Gunti" wrote:

Hi,
I'm very new to creating macro's. I've got a (maybe stupid question).

I have the following situation:

Basiscly what i want (what i would make of it) is the following code:



Range("L45").Value = "Worksheets("Invulblad").Range("AA47").Value * L43"

I want cell L45 to say:

=0,05*L43

if AA47 on sheet 'Invulblad' is 0,05 and

=0,00*L43

if AA47 on sheet 'Invulblad' is 0,00

Any help appreciated,

Greets,
Gunti