Hi Skanda, Not just 1000 but even if you've 50000 or more rows of data, you can drag your formula down to fill all cells of rows automatically. Here is how to achieve it:
1. Suppose you've data in rows 1 to 1000. and data in Col A and Col B. Then, Type Formula as suggested in Col C and Col D. 2. Now, select the Cell C1 to D1000. 3. Press Ctrl+D. and Done !! Try these steps and let us know, if need more help. We're always here for you. For more tips, tricks, downloads and problem solutions: visit --> http://www.excelitems.com ------------------------------------------------------------------------ Regards *Ashish **Jain* Analyst, CSC Microsoft Certified Application (Excel) Specialist Technical Trainer - Excel and VBA Author ->www.excelitems.com +91-9999-40-48-43 ---------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------- On Mar 10, 8:43 pm, Skanda <skanda.pokkun...@gmail.com> wrote: > Ashish, > Thanks for the help. This is helpful if we have less number of rows. If I > have a couple of thousand how do we do it?I mean a macro or something like > that. > > On Tue, Mar 10, 2009 at 11:38 AM, Ashish Jain <26may.1...@gmail.com> wrote: > > > ---------------------------------------------------------------------------------------------------------------------------- > > > Hi Skanda, > > > Try this formula based solution: > > > Col A Col B Col C Col > > D > > Row 1 5 5 =IF(A1=B1,0,1) =A1-B1 > > Row 2 7 2 =IF(A2=B2,0,1) =A2-B2 > > Row 3 4 9 =IF(A3=B3,0,1) =A3-B3 > > > For more tips, tricks, downloads and problem solutions: visit --> > >http://www.excelitems.com > > ------------------------------------------------------------------------ > > Regards > > *Ashish **Jain* > > Analyst, CSC > > Microsoft Certified Application (Excel) Specialist > > Technical Trainer - Excel and VBA > > Author ->www.excelitems.com > > +91-9999-40-48-43 > > > ---------------------------------------------------------------------------------------------------------------------------- > > > ---------------------------------------------------------------------------------------------------------------------------- > > > On Mar 10, 7:32 pm, Skanda <skanda.pokkun...@gmail.com> wrote: > > > Hi Guys, > > > If I need to compare two columns in the same worksheet say column A and > > > Column B. If there is a difference between two corresponding cells in A > > and > > > B then result should be '1' in correspoding cell in column C else result > > > should be '0'.And the difference between col A andCol B should be > > displayed > > > in Col D > > > > Also the same scenario if we need to compare two columns in two > > worksheets > > > how is this achieved? > > > > Col A Col B Col C Col D > > > 5 5 0 0 > > > 7 2 1 5 > > > 4 9 1 -5 > > > > Thanks for your help --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- 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 ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---