Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2007

Tip: Looking for answers? Try searching our database.

Find criteria and change offset information

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
whicks - 03 Apr 2007 21:46 GMT
I am a beginner at writing my own VBA code.  I have roster of names
and associated information.  What I would like my code to do is, find
a certain value in column V and replace information in column AG &
column AJ in the same row.

Here is what I have so far...

Range("V1").Select

Do While Activecell <> ""
   Do While Activecell = "X"
         ActiveCell.Offset(0, 11) = "XYZ"
         ActiveCell.Offset(0, 14) = "XYZ"
         ActiveCell.Offset(1, 0).Select
Loop
Loop
End Sub

It seems right to me but doesn't work any suggestions are welcome.
Bob Phillips - 03 Apr 2007 22:56 GMT
Range("V1").Select

Do While Activecell.Value <> ""
  If Activecell.Value = "X" Then
         ActiveCell.Offset(0, 11) = "XYZ"
         ActiveCell.Offset(0, 14) = "XYZ"
         ActiveCell.Offset(1, 0).Select
   End If
Loop
End Sub

Signature

---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

>I am a beginner at writing my own VBA code.  I have roster of names
> and associated information.  What I would like my code to do is, find
[quoted text clipped - 15 lines]
>
> It seems right to me but doesn't work any suggestions are welcome.
kounoike - 04 Apr 2007 01:01 GMT
>I am a beginner at writing my own VBA code.  I have roster of names
> and associated information.  What I would like my code to do is, find
[quoted text clipped - 11 lines]
>          ActiveCell.Offset(1, 0).Select
> Loop

ActiveCell.Offset(1, 0).Select     'Insert here

> Loop
> End Sub
>
> It seems right to me but doesn't work any suggestions are welcome.

keizi

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.