The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 calculation across 2 worksheets

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
fastelectron Posted - 07/26/2013 : 03:22:14 AM
Origin Ver. : 8.5
Service Release : SR1
Operating System: Windows 7

Hi ,

I am facing a tedious task in some calculation.

I have 2 worksheets, say A and B.

A has 2 cols and n rows.

B has n+1 cols and ~150 rows. (1st col X and the rest all Y)

Now I need to divide the first col and each subsequent col of B
with each row values of A.

ie,

xn = B(1st col) / A(n row,1 col)

and

yn = B(nth col) / A(n row,2 col)

for all values of n.

I am having 8 such (A,B) pairs of worksheets, and I am already
crossing all the limits of sanity.

somebody plz save me.

thanks alot

-S.

---
1   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 07/26/2013 : 11:50:11 AM
Hi fastelectron,

You seem to need to tailor a script for such repetitive calculation.

I couldn't figure out the xn part. Do you want to produce n columns from the first column of B?
Anyway, for yn part, I made the following script to do the job:
For(ii=1; ii<=11; ii++) {
  range cx=[Book4]!wcol(ii);
  range ax=[Book3]!wcol(ii);
  range bx=[Book2]!wcol(ii);
  cx=bx/ax[2];
}
To run this, I did the following steps (Book1 is your A, Book2 is your B):
1) Transpose Book1, and insert a column at the top of the result. (Book3)
2) Duplicate Book2 (to make Book4 for output), and run the script.

This produces the result in Book4 by dividing column n in Book2 by the column n row 2 in Book3.
(The first column is unchanged as I have put 1 to the first column of Book3.)



Hope this lets you start your job easier.

--Hideo Fujii
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000