Solved

Do Loop question

Posted on 2013-12-23
3
137 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
  • 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 500 total points
ID: 39736031
InStr(1, Cells(i, 8).Value, "3588343") > 0
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
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…

805 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