Thread: Macro
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
steve_doc steve_doc is offline
external usenet poster
 
Posts: 140
Default Macro

Tools/Options/Calculations
are your calculation setting set to manual/Automatic?



"Gustavo Strabeli" wrote:

Tom,

It's almost OK despite the fact that when I click on the button all the results in column M are #NAME?
However, if I click on the formula bar, the result appears...
Any idea?

Tks.


"Tom Ogilvy" escreveu na mensagem ...
set rng = Range("L13",Range("L13").End(xldown)).offset(0,1)
rng.formula =
"=IF(OR(L13=""40HC"",L13=""40RH""),K13*2,25,IF(LEF T(L13,2)=""40"",K13*2,K13))"

--
Regards,
Tom Ogilvy



"Gustavo Strabeli" wrote:

Hi there!

Can anyone please inform how I can built a macro to apply a formula to some cells?
In other words, I need a button to click on it and have below formula applied from cell M13 until the last data in the same column M.
Formula is: =IF(OR(L13="40HC";L13="40RH");K13*2,25;IF(LEFT(L13 ;2)="40";K13*2;K13))

Thanks a lot.
Gustavo.