Hi Ramesh, You need to freeze the data range and them move down.
=countif($a$2:$a$10,"M"). Use F4 key in formula to freeze (Lock) the cell references. Thanks, Dilipandey -- DILIP KUMAR PANDEY MBA-HR,B COM(Hons.),BCA Mobile: +91 9810929744 dilipan...@gmail.com dilipan...@yahoo.com New Delhi - 110062 On Sun, Jun 7, 2009 at 5:24 PM, Ramesh Katta <kr.sap...@gmail.com> wrote: > Dear Members, > > My question seems to be very simple, please don't laugh at me. > > I have 2 columns that are A1 contains Names and B1 contains Sex of > employee. When finding no. of males and females using countif() > function. When I copied the function I am getting range difference. > > For ex: > > =countif(a2:a10,"M") when I copied this range to below cell and > changed criteria to "F" but it taking range from a3:a10. > > Please clarify this doubt. This was asked in interview. > > I attached excel sheet with this mail. > > Thanks&Regards > Ramesh > > > > --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- 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 ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---