Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Do Loop question

Posted on 2013-12-23
3
Medium Priority
?
148 Views
Last Modified: 2013-12-27
Hi Guys, I have a While...Wend Loop that loops down column 5 in a spreadsheet.how do I change the following code to add an Instring to the Loop. If I wanted to Loop down and look for the number "3588343" in a cell in column 5, how would I adapt the following code?


Sub Nonvalidated2()
Dim Prevday As String
Dim i As Integer
Worksheets("Rec").Select

'Prevday = WorksheetFunction.WorkDay(Date, -1)
i = 4


While Cells(i, 5).Value <> ""


ElseIf Cells(i, 8).Value = "3588343, 3587873" Then

Cells(i, 30).Value = "Manual Jnl - 1532952/jwils2 - REVERSE OPENING STD JOURNAL & 1646037/ikass - EUC - MONTHLY EIR POSTINGS FOR FV HEDGE STRUCTURES DE-DESIGNATED"
0
Comment
Question by:Justincut
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Expert Comment

by:andrew_man
ID: 39735917
Post your workbook here!
0
 

Author Comment

by:Justincut
ID: 39736003
0
 
LVL 4

Accepted Solution

by:
andrew_man earned 2000 total points
ID: 39736031
InStr(1, Cells(i, 8).Value, "3588343") > 0
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question