Dear Habeeb, Try the following formula. adjust the range as per your data.
=SUMIF(A3:A12,"Sub Total",B3:B12) Thanks & regards, || Mudassar Ramzan | MIS Officer | WorldCALL Telecom Ltd | 061- 814-3999 | 0321 7325277 || ----- Original Message ----- From: Habeeb Mohammed To: excel-macros@googlegroups.com Sent: Friday, May 15, 2009 9:34 AM Subject: $$Excel-Macros$$ formula in macros Hi Guys, I currently written a code were in total will be populated by adding various sub totals. But I am not able to put in the formula for adding for future reference. I am not able to think a logic for that. I have explained my requirement in the attachement. Please help me Thank you Habeeb ------------------------------------------------------------------------------ MSN Battles We pitch one stalwart against the other and give you the power. Who will you vote for? Share photos while you chat with Windows Live Messenger. --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---