Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Creating Rules

I'm trying to make a macro that will create rules to solve problems based on
a bunch of interrelated vairables. I'm new to visual basic and I'm not sure
how I go about starting this process. I want to be able to enter in the
variables I know and have possible solutions for the unknown variables. I
don't think I can do this conventionally with functions because there are
cirular references in some of the rules.

For sake of this example my variables a A, B, C, D, E, F, G, H, W, J, K,
L, M, N, X, P, Q, R, S, and T

(I used W and X instead of I and O so they don't get confused with numbers)

I want to be able to enter each variable into a cell and have a macro
simultaneously satisfy the following rules:

1) A=B+C+D+E
2) B=A*.1
3) C=A*.2
4) D=A*.65
5) E=A*.05
6) F=((A*.1)*G)+((A*.2)*H)+((A*.65)*W)+((A*.05)*J)
7) 52*5=X
8) K=10
9) L=10
10) M=5
11) N=X-(K+L+M)
12) P=N*8*60*Q
13) R=S
14) T=P/S
15) F=T

If anyone could point me in the right direction I would really appreciate
it! If this is possible with functions that would be much more familiar to
me (though I don't mind using vb at all if I know how to look up what I don't
know)

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Creating Rules

Hi,

you can calculate what you need using circular references (in fact
circular references might be really useful, if you know how to use
them). I didn't study your formulas in detail, but maybe you will have
to rearange their position (means which is calculated first, second
....) to achieve result you expect.

Look for inspiration at Stephen Bullen's page:

http://www.oaltd.co.uk/Excel/Default.htm

(file Previous.zip).

Regards,
Ivan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Creating Rules

I've set up all of the variables and the equations on this sheet:

http://www.savefile.com/files/8301241

I tried using the iterate circular reference trick but I couldn't get it to
work for me. Does anyone know where I'm messing up? Is there an easier
macro solution?

Thanks again everyone!

"Ivan Raiminius" wrote:

Hi,

you can calculate what you need using circular references (in fact
circular references might be really useful, if you know how to use
them). I didn't study your formulas in detail, but maybe you will have
to rearange their position (means which is calculated first, second
....) to achieve result you expect.

Look for inspiration at Stephen Bullen's page:

http://www.oaltd.co.uk/Excel/Default.htm

(file Previous.zip).

Regards,
Ivan


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Some rules about Vlookup JohnC[_2_] Excel Discussion (Misc queries) 2 January 26th 10 01:50 AM
how do I set up a validation rules with two data rules Trudy Excel Worksheet Functions 1 October 16th 06 05:42 AM
Setting rules for y scale nospaminlich Charts and Charting in Excel 2 May 23rd 06 12:31 PM
Validation rules Souris Excel Programming 3 August 19th 05 08:09 PM
Creating/modifing Outlook Rules from Excel BruceJ[_2_] Excel Programming 1 October 20th 03 09:57 PM


All times are GMT +1. The time now is 02:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"