Solved

Do Loop question

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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

730 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