View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default 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