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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 calculation across 2 worksheets
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

fastelectron

India
5 Posts

Posted - 07/26/2013 :  03:22:14 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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.

---

Hideo Fujii

USA
1582 Posts

Posted - 07/26/2013 :  11:50:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Edited by - Hideo Fujii on 07/26/2013 11:52:43 AM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000