Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

What is the equivalent?

Posted on 2014-03-26
3
Medium Priority
?
278 Views
Last Modified: 2014-03-26
Hi All,

Suppose we have the following script:

(1)     "= if(constants!AO" & i & ">constants!AM" & i & ", 1, 0)"

which of course, in lay terms, is just putting in the formula

(2)      =if((constantsAO + row))>(constantsAM + row), then 1, else 0))

how would I do the reverse to get this starting with, in lay man terms:

(2)       = Round((constantsAO + row), AP),

      ....where in the column AP there is the corresponding list of significant digits, relevant to the correct row.

Wondering how to get this back into form (1).

(1) = ?

Is there also a way to get it into this form as well?

(1b) = constants.cells(i, "AO").formula?          {I know I butchered that, pls be kind}.


thanks!!
0
Comment
Question by:BostonBob
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
nutsch earned 2000 total points
ID: 39958016
how about this?

.formular1c1="= Round((constants!RC41), RC42)"

with the R1C1 notation, you don't need to specify a row number as it's relative addressing (see more info here)

or with your example:

 "= Round(constants!AO" & i & ",constants!AP" & i & ")"

Thomas
0
 

Author Comment

by:BostonBob
ID: 39958036
thanks for that!

I am going to have a number of these little script issues to tackle so please keep me on your radar for easy points!
0
 
LVL 39

Expert Comment

by:nutsch
ID: 39958038
Glad to help.

Thomas
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
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…

810 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