MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old May 24th, 2002, 08:11 AM   #1
niels
New Member
 
Join Date: May 2002
Posts: 10
Default

Hi

I hope someone can help me with the following problem - and that I can describe it so you can understand it:

When using the matrix reference style (R1C1 reference style) in Excel - is it then posible to use input data in this reference ?

For exampel - In a certain cell-equation I want to "point" to cell RxC5 but need to change the values of x so I dont want the numbers in the code/formulas..
So I put the value of x in cell R1C1. Now I need excel to "read" this value.. In my mind this would look something like this:
R(R1C1)C5

This obviously does not work so I thought I could use some sort of Macro/program to do this.

I am not a visual expert so if the solution for my problem is very complicated let me know - and I'll do the whole thing in Matlab
But if there is a fairly simple solution (or if someone knows how to do this with simple excel equations) I would be a very happy person if you could help me

Best regards
Niels Kau Andersen
niels is offline   Reply With Quote
Old May 24th, 2002, 08:16 AM   #2
sann0638
Board Regular
 
Join Date: Mar 2002
Posts: 175
Default

Hi,
try the indirect function:
=INDIRECT("R"&A1&"1C1")

Sorry - this doesn't work. Anyone suggest why not?

_________________
Regards, Mike.

[ This Message was edited by: sann0638 on 2002-05-24 07:20 ]
sann0638 is offline   Reply With Quote
Old May 24th, 2002, 08:17 AM   #3
JayKay
New Member
 
Join Date: May 2002
Location: Leicester, UK
Posts: 40
Default

Hi

You could also try using the OFFSET worksheet function.

Cheers

JayKay
JayKay is offline   Reply With Quote
Old May 24th, 2002, 08:25 AM   #4
niels
New Member
 
Join Date: May 2002
Posts: 10
Default

[quote]
On 2002-05-24 07:16, sann0638 wrote:
Hi,
try the indirect function:
=INDIRECT("R"&A1&"1C1")

Sorry - this doesn't work. Anyone suggest why not?

The excel help defines the indirect function as: INDIRECT(ref_text,a1)

where a1 is a logical value. which should be set to false if you're using r1c1 reference style.. Maybe that is it.. I'm trying to find out myself.. Any further help would ofcourse be apreciated,,
thx

Niels
niels is offline   Reply With Quote
Old May 24th, 2002, 08:25 AM   #5
Mark O'Brien
MrExcel MVP
 
Mark O'Brien's Avatar
 
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
Default

Niels,

I'm just curious, but what is your project that you're working on?

I used to use MATLAB a lot and when I stopped using it The Mathworks was beginning to bring out some better tools for connecting to other applications like Excel, gPROMS, SPEEDUP etc.
__________________
Mark O'Brien

Columbus Ohio Celtic Supporters Club
Mark O'Brien is offline   Reply With Quote
Old May 24th, 2002, 08:36 AM   #6
niels
New Member
 
Join Date: May 2002
Posts: 10
Default

[quote]
On 2002-05-24 07:25, Mark O'Brien wrote:
Niels,

I'm just curious, but what is your project that you're working on?



Well - I'm using this for analysing data from a process simulator (in chemical engineering) and the data comes out as a matrix. Every stream in a column and then the stream data in the rows (temperature, pressure, flowrates of each component etc)

I have made the analysis in a excel-sheet but my boss would like to generalize it.. To aply it to different processes. So my idea was that if you put the number of the component and the number of the stream - you should be able to extract data from the matrix mentioned above..

I.e. If i choose compound = 1 and stream = 5 I should be able to acces the data sheet in the cell r1c5

I know I could do this in matlab - but since all the calculations are already in excel, well I though I could save some time

Niels
niels is offline   Reply With Quote
Old May 24th, 2002, 08:41 AM   #7
lenze
MrExcel MVP
 
lenze's Avatar
 
Join Date: Feb 2002
Location: Helena, MT
Posts: 13,690
Default

Why not use the INDEX function? If Compound is in A1 and Stream in A2, Then INDEX("Yourmatrix",A1,A2) should return the value from your table corresponding to the values in A1 (Row number) And A2(Column Number)

Edit: You can improve this by comining Index with the Match funtion
[ This Message was edited by: lenze on 2002-05-24 07:41 ]

[ This Message was edited by: lenze on 2002-05-24 07:43 ]
lenze is offline   Reply With Quote
Old May 24th, 2002, 08:53 AM   #8
Mark O'Brien
MrExcel MVP
 
Mark O'Brien's Avatar
 
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
Default

Quote:
Every stream in a column
Not a binary distillation column? Or a multi-component distillation column? (I'd be impressed by that one)

My old work had a couple of nice little graphing utilities. One used MATLAB's graphing and the other imported data to Excel. It was rather snifty.

...sorry this is completely off topic, but I can't answer the question and I'm 100% positive someone here can, so there's no harm keeping the thread at the top.

EDIT:: Just reread your post, I guess you mean the array that your passing between simulation blocks when you said "column".
_________________
[b] Mark O'Brien

[ This Message was edited by: Mark O'Brien on 2002-05-24 07:55 ]
Mark O'Brien is offline   Reply With Quote
Old May 24th, 2002, 09:14 AM   #9
niels
New Member
 
Join Date: May 2002
Posts: 10
Default

[quote]
On 2002-05-24 07:53, Mark O'Brien wrote:
Quote:
Every stream in a column
Not a binary distillation column? Or a multi-component distillation column? (I'd be impressed by that one)

Well, actually it is the whole plant - but lokking only at the "external" streams, between the units..

The "matrix I was desribing looks something like this:
_________stream1 stream2 stream3 etc
temp
pressure
flow1
flow2

with data in the "center"...

So the flow of component 2 in stream 2 would be in cell C5 or R5C3 in the other notation

What I want is if I make a box where people can put component number and another with stream number. That would give Component=2 and stream=2 but I need the data from R5C3 , i.e the code should look like this
R(3+2)C(1+2) where the two 2's would be read from the input box'es and the 3 and 1 just counts for the fact that the data doesn't start in 0,0..

Ayway - thx for the inputs - which I have to look at. And feel free to add more info

Best regards
Niels



[ This Message was edited by: niels on 2002-05-24 08:19 ]
niels is offline   Reply With Quote
Old May 24th, 2002, 09:52 AM   #10
niels
New Member
 
Join Date: May 2002
Posts: 10
Default

Quote:
On 2002-05-24 07:17, JayKay wrote:
Hi

You could also try using the OFFSET worksheet function.
Hi JayKay

I think you saved me there.. That offset function is pretty good - and I think I can get the whole thing to work using that...

Thx a bunch and just to let you know that I'm very impressed with this forum. Kepp up the good work - and I'll probably be back again

Niels
niels is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 10:44 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes