Solved

Do Loop question

Posted on 2013-12-23
3
133 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
Comment Utility
Post your workbook here!
0
 

Author Comment

by:Justincut
Comment Utility
0
 
LVL 4

Accepted Solution

by:
andrew_man earned 500 total points
Comment Utility
InStr(1, Cells(i, 8).Value, "3588343") > 0
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
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…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

771 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now