Find a word in column 'B', move 15 places right, select all cells up to cell Q4 and clear.

Can someone provide me with vba code that will Find a word in column 'B', move 15 places right, select all cells up to cell Q4 and delete.

i.e. if the word is Monday and it's in B24 move across to Q24 then select from Q4 to Q24 and make all cells in that range blank.

Thanks
JagwarmanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

[ fanpages ]IT Services ConsultantCommented:
Hi,

As you requested:

Public Sub Q_28233963()

  Dim objCell                                           As Range
  
  Set objCell = Columns("B").Find(What:="Monday", LookAt:=xlWhole)
  
  If Not (objCell Is Nothing) Then
     Range(Cells(4&, "Q"), Cells(objCell.Row, "Q")).ClearContents
  End If ' If Not (objCell Is Nothing) Then
  
  Set objCell = Nothing
  
End Sub

Open in new window


BFN,

fp.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ButlerTechnologyCommented:
Is this a one-shot procedure?  This is to imply that once it finds the word that it will remove the values in the range and then it is finished.

Tom
0
JagwarmanAuthor Commented:
yes a one shot procedure
0
JagwarmanAuthor Commented:
that's exactly what I needed thanks fanpages.
0
[ fanpages ]IT Services ConsultantCommented:
You are very welcome.

Good luck with the rest of your project.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.