#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Tricky Macro

I need help making my stealthy macro even stealthier.

I want the macro to find a row where if column C is less then or equal to 90
and column A does not contain the words "Huzza" or "Rock On" it will copy the
contents of column B to column C. Now, i know that there will be come cases
where the info copied into column C from B will sometimes still be equal or
greater to 90 so i need to either make this little code run only once or put
a nice little if column B equals column C don't run. Or...something.

Is this possible? Do i just do a bunch of loops or ???
Your insight would be most valuable

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Tricky Macro


iLastRow = C ell(Rows.Count,"C").End(xlUp).Row
For i = 1 To iLastRow
If Cells(i,"C").Value = 90 Then
If Cells(i,"A").Value < "Huzza" And Cells(i,"A").Value < "Rock
On" Then
If Cell(i,"B").Value < 90 Then
Cells(i,"C").Value = Cells(i,"B").Value
End If
End If
End If
Next i

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"teddy0bear" wrote in message
...
I need help making my stealthy macro even stealthier.

I want the macro to find a row where if column C is less then or equal to

90
and column A does not contain the words "Huzza" or "Rock On" it will copy

the
contents of column B to column C. Now, i know that there will be come

cases
where the info copied into column C from B will sometimes still be equal

or
greater to 90 so i need to either make this little code run only once or

put
a nice little if column B equals column C don't run. Or...something.

Is this possible? Do i just do a bunch of loops or ???
Your insight would be most valuable



Reply
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
how do I email amacro? leo Excel Worksheet Functions 24 August 9th 06 02:47 PM
link to combobox legepe Excel Discussion (Misc queries) 4 July 26th 06 04:45 PM
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
This one is tricky....Macro to save file as cell value x in di Andy Excel Discussion (Misc queries) 4 November 26th 04 08:52 AM


All times are GMT +1. The time now is 11:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"