LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default follow up: the actual code

Sub Macro1()
' Macro1 Macro
' Macro recorded 7/25/2006 by sdziamchuk
'
Dim cell As Range

Dim str As String

Windows("experiment cahs trans.xls").Activate

For Each cell In Range("a2:a40")

If cell = 272244 And cell.Offset(0, 1) < "MISCELLANEOUS" Then

cell.Offset(0, 2).Range("a1:l1").Select
Selection.Copy
Sheets("sheet1").Select
ActiveCell.Offset(9, 0).Range("a1").Select
Selection.Insert shift:=xlDown
Sheets("experiment cahs trans").Select

ElseIf Not IsEmpty(cell.Value) Then

cell.Select
With Selection.Interior
..ColorIndex = 5
..Pattern = xlSolid
End With

Else: Exit Sub


End If
Next cell
End Sub


--
Sergei D
 
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
Complicated If Then / V Lookup / Match Statement... ryesworld Excel Worksheet Functions 17 December 10th 05 02:09 PM
Need 2 add second then third code with first code in the Tab View nick s Excel Worksheet Functions 3 December 6th 05 02:20 AM
Data from Excel to Access Table Secret Squirrel Excel Discussion (Misc queries) 11 December 2nd 05 11:58 PM
Macro for changing text to Proper Case JPriest Excel Worksheet Functions 3 August 8th 05 09:31 PM
close form code tkaplan Excel Discussion (Misc queries) 1 June 3rd 05 10:49 PM


All times are GMT +1. The time now is 04:36 PM.

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"