LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
 
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
Text Running Out of Cell fallmare Excel Discussion (Misc queries) 1 February 16th 10 01:21 PM
Running a macro from currently selected cell? GD Excel Discussion (Misc queries) 1 February 10th 09 05:11 PM
Running Macro when a cell value changes Ayo Excel Discussion (Misc queries) 1 April 18th 07 03:09 PM
Running a macro on cell value change Mike Excel Discussion (Misc queries) 0 March 28th 07 01:13 AM
Running a macro when a cell value changes Emea training[_2_] Excel Programming 3 August 1st 04 03:07 PM


All times are GMT +1. The time now is 10:36 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"