Hi Sharma, First you have to format all the necessary cells as 'Text', otherwise the "0" is lost.
Then try putting this into data validation (Custom, Formula) of A3: =AND(ISNUMBER(VALUE(A3)),LEN(A3)=10,LEFT(A3,1)="0") Copy validation to necessary cells. Hope this helps. Regards - Dave Date: Wed, 13 May 2009 16:50:11 +0530 Subject: $$Excel-Macros$$ Re: Fwd: Help required From: amrahs...@gmail.com To: harmeet.hew...@gmail.com CC: excel-macros@googlegroups.com Hi Harmeet, Please find the attached sample workbook that contains a simple query for my project. Thanx in advance. Regards, Sharma On Wed, May 6, 2009 at 10:58 PM, Harmeet Singh <harmeet.hew...@gmail.com> wrote: Hi, Please see attached file. On Wed, May 6, 2009 at 5:53 PM, amrahs k <amrahs...@gmail.com> wrote: Hi Team, I need your help it is very urgent! Thanks, Sharma ---------- Forwarded message ---------- From: amrahs k <amrahs...@gmail.com> Date: Wed, May 6, 2009 at 5:33 PM Subject: Help required To: gyanjai...@gmail.com Hi Jain, I have attached the sample spreadsheet that i was working upon for my project. The requirement would be- Count the data that has been entered in each cell under coulumn D6:D17, F6:F17, H6:H17 and so on. (every alternate column) I want the macro to evaluate the total count of each alternate coulumn though I have few conditions. condition 1: count all the data entered in each cell (text or numeric value) condition 2: do not count the data "NA" It would be helpful if the macro populated the result in a message box- Ex: The Total Count is "13" (The attached document has 17 data in the range D6:D17, what i want to exclude the value "NA" and produce the result as "13"). similarly for every alternate column. I believe you could do this since am not familiar with VBA macro. Thanx in advance. Regards, Sharma -- Thanks & Regards, Harmeet Singh _________________________________________________________________ Looking for a fresh way to share your photos? Check out the new Windows Live Messenger http://windowslive.ninemsn.com.au/article.aspx?id=792335 --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- 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 ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---