View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Greg[_17_] Greg[_17_] is offline
external usenet poster
 
Posts: 9
Default Running macro when cell contains text

Hi
I wish to run a macro that will reformat a list,
then paste the values to a new set of cells on the same sheet.
I have recorded the macro with Relative Reference's and it works
perfectly for one line.
I have included the line at the start of the macro "For i = 1 to 100"
and at the end "next i" so that it runs down the 100 rows on the
sheet.
My problem is that I only want to run the macro if a cell within
column A contains text eg
A1= apple, then run the reformat macro.
A2= pear, don't run the macro.
A3= Blank cell,don't run the macro.
A4= apple, then run the reformat macro.
.........checking each row until the end of the sheet.
I have looked at many posts to find a solution. Can it be done this
way or should I be looking at a different approach to solve this.
Thanks
Greg