[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

While Wend Loop Problem

Posted on 2013-12-27
8
Medium Priority
?
241 Views
Last Modified: 2014-01-03
Hi Guys, I have a While....Wend Macro which loops down a Column and then populates  Column AD of my attachment depending on which IF condition has been satisfied. For some reason, on some occasions it has populated the wrong comment in column AD.I have copied and pasted these Exceptions onto the tab "Exceptions" in my attachment. The biggest culprit is the the comment " On-dashboard- f/e error". Can someone find out why this is happening?
DummyRec11.xlsm
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
  • 5
  • 3
8 Comments
 
LVL 49

Expert Comment

by:Martin Liss
ID: 39742291
54 is column BB. Is that the column you want to look at?
0
 

Author Comment

by:Justincut
ID: 39742585
Yep.
0
 
LVL 49

Expert Comment

by:Martin Liss
ID: 39742605
Well I did the following and every 'i' that printed had a value in column BB, so what's wrong?

ElseIf Cells(i, 54).Value <> "" Then
Cells(i, 30).Value = "On dashboard - f/e error"
Debug.Print i
Cells(i, 31).Value = "BAU - Dashboard"
Cells(i, 32).Value = "JC"
Cells(i, 33).Value = 0
Cells(i, 34).Value = "GL Incorrect"
0
Independent Software Vendors: 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!

 

Author Comment

by:Justincut
ID: 39742625
Did you use the Immediate window for this? I think the Lookup in the Range "Errors" has inexplicably shown a value of 0 for some cells and this has triggered the Macro.

Can you have a look at some of the other Values that have appeared in the "Exceptions" tab?
0
 
LVL 49

Expert Comment

by:Martin Liss
ID: 39742723
Yes I used the Immediate Window.

Rather than me looking through every test for every cell, why don't you just point out a row or two on the Rec sheet that you believe are incorrectly being flagged as errors.
0
 

Author Comment

by:Justincut
ID: 39746699
Hi, the same has happened on today's Rec too. I have shaded in Purple all the Cells in AD which are wrong. Although column BA says "NA#", its populated column AD with the comment "On dashboard - non-validated trade" It should only populate this comment if column BA does not say "NA#". Can you loop through and find out why?
Dummyfile12.xlsm
0
 
LVL 49

Accepted Solution

by:
Martin Liss earned 2000 total points
ID: 39747051
I assume that the code in the workbook that you attached is a stripped down version of your real workbook and that there are other procedures in addition to Nonvalidated2 in the real workbook. It must be one of those procedures that is placing the "On dashboard - non-validated trade" message in column because I guarantee you that Nonvalidated2 is not doing it.

Note however that in Nonvalidated2 that the columns you are referring to may not be the ones you intend because for one thing if you mean for the numbers 29, 30, etc in row one to be the column numbers they're not and AD should be 30, AE should be 31, etc.

Here's a simple function you can call to verify the column number to column letter relationship.
Function ColNumToLetter(lColNum As Long) As String
' Convert numeric to column letter
 
    ColNumToLetter = Split(Cells(1, lColNum).Address, "$")(1)
End Function

Open in new window

0
 
LVL 49

Expert Comment

by:Martin Liss
ID: 39751702
Did my comments above help you?
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…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

656 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