Solved

Explanation of cells function in Excel VB

Posted on 2014-09-03
3
129 Views
Last Modified: 2014-09-04
Experts,

If i = 420    and    j =1
Can you tell me what this command says:

 If Cells(i + 2, j * 2 + 1) <> 0 And Len(Cells(i + 2, j * 2 + 1)) > 0 Then GoTo notDelete
0
Comment
Question by:morinia
3 Comments
 
LVL 45

Assisted Solution

by:Martin Liss
Martin Liss earned 167 total points
ID: 40302350
It says "If the cell in row 422 and column 3 (because J is 1 and 1 x 2 plus 1 is 3)  is not zero and the length is greater than 0 the go to notDelete". BTW goto used like that is IMO poor programming.
0
 
LVL 27

Assisted Solution

by:Glenn Ray
Glenn Ray earned 166 total points
ID: 40302364
No points, just restating:

If C422 is not equal to zero, AND if the number of characters in C422 is more than zero, then goto "notDelete."

I agree with Martin that the use of GoTo should be avoided.  Perhaps the logic can be changed in this test so that the lines between this test and "notDelete" are executed instead.  

-Glenn
0
 
LVL 35

Accepted Solution

by:
[ fanpages ] earned 167 total points
ID: 40303098
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
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…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

708 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

13 Experts available now in Live!

Get 1:1 Help Now