Find criteria and change offset information

  • Thread starter Thread starter whicks
  • Start date Start date
W

whicks

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.
 
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


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
whicks said:
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

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

It seems right to me but doesn't work any suggestions are welcome.

keizi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top