Thread: create macro
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Todd[_5_] Todd[_5_] is offline
external usenet poster
 
Posts: 28
Default create macro

Hi, I am trying to make a macro that looks into a range
of cells I select and adds to a forumla. I have worked
something up but it doesn't work. Can someone help?

Thanks,


Todd

I have:
=IF(Ds140,ROUND($E14*Ds14,0),"")

I want:
=IF(DS14="","",IF(DS140,ROUND($E14*DS14,0),""))

The macro I am working with is:
Sub ReplaceDataTEST()
Selection.Replace What:="IF(DR140", Replacement:="IF
(Ds14="","",IF(Ds140", LookAt:=xlPart
End Sub