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 for Programming
 LabTalk Forum
 How to make comparison chart to display two varyin
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Matrix2021

Trinidad and Tobago
3 Posts

Posted - 07/15/2020 :  10:52:52 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello.

I am not sure if you can help me. I just don't know...

I would love to know, how to make comparison chart to display two varying sets of data.

I have two workbooks.

One of the workbook have 181 worksheets. "Each worksheet name after a country and have its own data.

Next

The other workbook have 185 worksheets."Each worksheet name after a country and have its own data.

This is the hard part:

#1 How can I link both workbook data together using macros? Country vs Country or USA vs USA as an example.

#2 How can I create a comparison chart to display two varying sets of data, both varying sets of data beginning with the zero values?

If you think I sound crazy. Please just say so lol. I am not sure if you are open in helping me. If so, I am looking for someone to point me to the right direction.

Thanks in advance

Cheers,

https://drive.google.com/file/d/1mmsL54lWBSVNsrP0INleJe-uW8U-2VVD/view?usp=sharing


https://drive.google.com/file/d/1JigNJKkY2IMGg4-aSXu0NnFnRRuvb6jx/view?usp=sharing

Toppin

YimingChen

1666 Posts

Posted - 07/17/2020 :  4:14:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Toppin,

A simple script can be:

string strCountry = US; // Set country ( sheet name )
plotxy iy:=[Book1]strCountry$!(1,2) plot:=200 ogl:=[<new template:=LINE12>];  // Plot into graph template LINE12 that is pre-created. 
plotxy iy:=[Book2]strCountry$!(1,2) plot:=200 ogl:=1;
layer -g; //Group plots





James

Edited by - YimingChen on 07/17/2020 4:14:41 PM
Go to Top of Page

Matrix2021

Trinidad and Tobago
3 Posts

Posted - 07/18/2020 :  02:10:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi YimingChen

I really appreciate your time and effort in responding to me.

However, I am not sure if I followed your tuition to the letter.

I have created a new module copied and paste the script you recommended and made the adjustments. Please view photo below.

My problem here is this: the script is written in red, as it have an error. What do you suggest I do from here? If I have done something wrong, if you are opened in helping me... How can I fix this?

Thanks in advance



Toppin
Go to Top of Page

YimingChen

1666 Posts

Posted - 07/20/2020 :  09:36:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I am sorry that I was talking about running the script in Origin software not in Excel. We have this scripting language called LabTalk which is similar to VBA in Excel. Thanks.

James
Go to Top of Page

Matrix2021

Trinidad and Tobago
3 Posts

Posted - 07/20/2020 :  3:59:38 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by YimingChen

I am sorry that I was talking about running the script in Origin software not in Excel. We have this scripting language called LabTalk which is similar to VBA in Excel. Thanks.


I have realize that I am in the wrong forum. Can you recommend me to someone to help me with my problem?

Thanks in advance

Toppin
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