View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
WhytheQ WhytheQ is offline
external usenet poster
 
Posts: 246
Default Macro - If bold then multiply by -1

dim myCell
for each myCell in activesheet.columns(1).cells
if myCell < "" then
if mycell.font.fontstyle = "Bold" then
on error resume next 'just incase there is text in
the cell
myCell = myCell*-1
end if
end if
next myCell

.....not tested but hopefully the above is a good start for you

J


On 31 May, 11:44, "
wrote:
Hi there

I have number in column A

What I want to do is have a macro that can look down the column and if
the cell is bold then multiply the contents by -1 in order for me to
turn it into a negative figure.

I someone can help with this,

Thanks

Andrea