'''''''''HOW TO RUN EXCEL FORMULA USING VBA''''''''' Option Explicit Sub Function_BY_VBA() ''''''''In sheet2 Range c2 Formula will be placed Sheets("SHEET1").Range("C2").Select ''''''' ActiveCell.FormulaR1C1 ="YOUR EXCEL FORMULA" ActiveCell.FormulaR1C1 = "=IF(RC[-2]>=60,""A grade"",""B grade"")" End Sub
*''''Please change the sheet name and formula accordingly.* On Tue, May 17, 2011 at 7:48 AM, Bob <bobandrich...@comcast.net> wrote: > I need this formula within the VB code on "Over Flow Report", Column > "D". =IF(C3="","",B3*C3). I'm trying to understand how it works. Is > this correct? Do I need to add anything?, Should it go in the > worksheet_change or worksheet_select_change? > Worksheets("Over Flow Report").Range("D3").Formula = > "=if(C3="""","""",B3*C3)" > Worksheets("Over Flow Report").Range("D3", > Range("D65536").End(xlUp).Offset(1, 1)).FillDown > [a:a].SpecialCells(xlBlanks).EntireRow.Delete > Thanks in Advance! > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > Like our page on facebook , Just follow below link > http://www.facebook.com/discussexcel > -- Regards, Prashant Tripathi Engineer-SW Mobile: 0017202597567 Please consider the environment before printing. ---------------------------------------------------- Immer zielen auf die vollkommene Harmonie des Denkens & Wort & deed.Always zielen darauf ab, reinigen Sie Ihre Meinung und alles wird gut. ---------------------------------------------------- Always aim at complete harmony of thought & word & deed.Always aim at purifying your thoughts & everything will be well. -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel