Solved

Explanation of cells function in Excel VB

Posted on 2014-09-03
3
136 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
[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
3 Comments
 
LVL 47

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

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 article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

751 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