![]() |
Macro to move cell contents based on formatting
I have a sheet that some data is identified by bold text as being an item
marking, in the same column other items (not in bold) are part numbers. Need to seperate those two things (part numbers and markings) into two different columns. How is this done with a macro? Thanks, Scott |
Macro to move cell contents based on formatting
Dim cell as Range, rng as range
set rng = Range(cells(1,ActiveCell.Column), _ Cells(rows.count,ActiveCell.Column).End(xlup)) ActiveCell.Entirecolumn.Offset(0,1).Insert for each cell in rng if not cell.font.bold then cell.offset(0,1).Value = cell.value cell.clearcontents end if Next -- Regards, Tom Ogilvy "Scott Wagner" wrote in message ... I have a sheet that some data is identified by bold text as being an item marking, in the same column other items (not in bold) are part numbers. Need to seperate those two things (part numbers and markings) into two different columns. How is this done with a macro? Thanks, Scott |
Macro to move cell contents based on formatting
PERFECT!
Thanks so much! "Tom Ogilvy" wrote: Dim cell as Range, rng as range set rng = Range(cells(1,ActiveCell.Column), _ Cells(rows.count,ActiveCell.Column).End(xlup)) ActiveCell.Entirecolumn.Offset(0,1).Insert for each cell in rng if not cell.font.bold then cell.offset(0,1).Value = cell.value cell.clearcontents end if Next -- Regards, Tom Ogilvy "Scott Wagner" wrote in message ... I have a sheet that some data is identified by bold text as being an item marking, in the same column other items (not in bold) are part numbers. Need to seperate those two things (part numbers and markings) into two different columns. How is this done with a macro? Thanks, Scott |
All times are GMT +1. The time now is 07:23 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com