Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA - Move cell contents if bold text
I have a piece of information (marking) that appears sometimes in column B of
my worksheet one row below a master line. Markings are not always used. When a marking is present it is always in bold text. I'd like to move the value from column B to column E and up one row. For example: (what I have now) A | B | C | D | E | 1 | 2 | Panelboard | | | | Marking (bold text) | | | | | Other entry (not bold text) | | | | What I would like to end up with: A | B | C | D | E | 1 | 2 | Panelboard | |Marking (bold text) | | Other entry (not bold text) | | | | Thanks in advance! Scott |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA - Move cell contents if bold text
lastrow = cells(rows.count,2).End(xlup).row
for i = lastrow to 2 step -1 if cells(i,2).Font.bold then cells(i-1,5).Value = cells(i,2).Value rows(i).Delete end if Next -- Regards, Tom Ogilvy "Scott Wagner" wrote: I have a piece of information (marking) that appears sometimes in column B of my worksheet one row below a master line. Markings are not always used. When a marking is present it is always in bold text. I'd like to move the value from column B to column E and up one row. For example: (what I have now) A | B | C | D | E | 1 | 2 | Panelboard | | | | Marking (bold text) | | | | | Other entry (not bold text) | | | | What I would like to end up with: A | B | C | D | E | 1 | 2 | Panelboard | |Marking (bold text) | | Other entry (not bold text) | | | | Thanks in advance! Scott |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA - Move cell contents if bold text
Thanks Tom!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
change cell contents to bold | Excel Worksheet Functions | |||
Join bold and non-bold text in one cell | Excel Discussion (Misc queries) | |||
VBA - Delete row if cell contents bold text | Excel Programming | |||
Macro to remove contents of cell and move all other contents up one row | Excel Discussion (Misc queries) | |||
Bold some of the cell contents | Excel Programming |