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: 111
Default move from active cell offset in macro

i have this macro
Sub loopthrough()
Dim myRow As Integer
myRow = 1

Range("AI225").Select
Do Until myRow = 10
If ActiveCell.Offset(0, -15).Range("a1").Select = "General Research" Then
ActiveCell.Offset(0, 15).Range("a1") = "MIT0000"
End If


ActiveCell.Offset(1, 0).Select

myRow = myRow + 1

Loop

End Sub
1.want to start at cell ai225.
2. go to cell t225 and if the contents = General Research
3 then go to cell ai and enter MIT0000
4. go the the enxt row and do the same thing

problem is if t225 does not equal "General Research" the active cell is t225
and the next iteration takes me 15 rows over from t225. i want to start the
if statement from ai226

thanks in advance for you help. i just thought of something - i could get
it back to ai 225 by making the alternative to MIT0000 a blank but i don't
know the code protocal for this.
--
aprilshowers
 
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
Move active cell to same location on each worksheet BeanoKid Excel Discussion (Misc queries) 3 April 15th 08 11:29 PM
macro- move down to empty cell & active worksheet EducatingMom Excel Worksheet Functions 3 August 4th 06 11:02 PM
How do I move cursor in an active cell without using delete/backsp Sam Excel Discussion (Misc queries) 2 May 29th 06 02:39 AM
need to Copy or Move to active cell from specified range kaream Excel Discussion (Misc queries) 2 December 14th 05 08:12 AM
How can I move the active cell in Excel with the arrow keys? Chuck T Excel Discussion (Misc queries) 3 December 12th 05 03:38 PM


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