Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 82
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 82
Default 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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Move cell contents with macro Peridot Excel Discussion (Misc queries) 4 September 30th 09 03:35 PM
Original cell formatting clears when I move contents LarryN Excel Discussion (Misc queries) 2 April 9th 08 10:54 PM
Formatting one cell based on the contents of another [email protected] Excel Discussion (Misc queries) 4 April 13th 07 06:15 PM
Macro to move the contents of a cell JenBasch Excel Programming 1 September 20th 05 01:47 AM
Macro to remove contents of cell and move all other contents up one row adw223 Excel Discussion (Misc queries) 1 July 1st 05 03:57 PM


All times are GMT +1. The time now is 01:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"