Hi Debasish, Select the Column and run this macro:
Sub CC() ' ' CC Macro ' Copy Non Blank Cells ' Selection.SpecialCells(xlCellTypeConstants, 23).Select Selection.Copy End Sub However there is another way of doing it: 1. Select the column. 2. Press CTRL+G (to bring up the GOTO dialog Box) 3. Press ALT+S (to bring up the Special section) 4. Press ALT+O (to activate the Constants i.e. nonblank cells) 5. Press Enter (to select the cells) 6. Press CTRL+C to copy (the cells selected) Now you can paste it wherever you want. Note: The macro that I had created, is a result of the above steps given. So you can also record your own macro with shortcuts of your choice. Hope this helps. Please feel free to let me know if you need further clarifications. Regards, Aindril On Sun, Feb 1, 2009 at 10:38 PM, Debasish Sahu <debasis...@gmail.com> wrote: > Hi I hv a xl sheet whre i want to copy one of the column which contains > both blank & non blank cells). but I want copying only non blank cells(cells > having data) from that column. Could somebody help me in writing a macro for > this. > > Regards > > Debasish Sahu > Assistant Manager - Geology > ACC Ltd. > Thane - 400 604 > India > > > > > --~--~---------~--~----~------------~-------~--~----~ Visit the blog to download Excel tutorials at http://www.excel-macros.blogspot.com To post to this group, send email to excel-macros@googlegroups.com For more options, visit this group at http://groups.google.com/group/excel-macros?hl=en Visit & Join Our Orkut Community at http://www.orkut.com/Community.aspx?cmm=22913620 To Learn VBA Macros Please visit http://www.vbamacros.blogspot.com To see the Daily Excel Tips, Go to: http://exceldailytip.blogspot.com If you find any spam message in the group, please send an email to Ayush @ jainayus...@gmail.com -~----------~----~----~----~------~----~------~--~---