# excel algorithm help

1. ## excel algorithm help

Hi All,

I am currently looking for some help with a project, the project should do the following:

cell B4,C4,D4 should pick a number 1-100, this should then give the MAX minimum value returned and MAX maximum total. - however, it will need to work out what values to put in this field to get the max MAX / max MIN.

what would be the best way of going about this?

I currently have a spreadsheet which will do the following:

cell B3,C3,D3 have decimal numbers
cell B4,C4,D4 have a figure (1-100)
cell B6 =(B3*B4)+G6
cell C6 =(C3*C4)+G6
cell D6 =(D3*D4)+G6
cell B7 =(B6-G7)
cell C7 =(C6-G7)
cell D7 =(D6-G7)
cell G3 =MIN(B7,C7,D7)
cell G4 =MAX(B7,C7,D7)
cell G6 =MIN(50,MAX(B4,D4))
cell G7 =(B4+C4+D4)

IF B3 = 2.8, C3 = 3.5, D3 = 2.6
AND B4 = 47, C4 = 50, D4 = 50

then

B6 = 181.6
C6 = 225
D6 = 170
B7 = 34.6
C7 = 78
D7 = 33
G3 = 33
G4 = 78
G6 = 50
G7 = 147

i need to try and calculate G3 and G4 to be the highest possible number.

2. ## Re: excel algorithm help

If you attach a sample workbook, then you don't need to describe the contents of each cell - we could see that for ourselves, and you can point out in your file what you want to achieve. The FAQ describes how to attach a file to one of your posts.

Hope this helps.

Pete

3. ## Re: excel algorithm help

Originally Posted by Kyle1234
I am currently looking for some help with a project, the project should do the following:

cell B4,C4,D4 should pick a number 1-100, this should then give the MAX minimum value returned and MAX maximum total. - however, it will need to work out what values to put in this field to get the max MAX / max MIN.

what would be the best way of going about this?
I would use VBA to run through all possible values of B4, C4 and D4, if they are integers, and determine the combination that results in the max G3 and max G4 at the same time.

It takes about 8 sec on my ancient computer to run through all 1 million combinations, doing all calculations in VBA. YMMV.

I'm disinclined to share the VBA code, since this might be a homework assignment.

(There might be a clever way to do this using Solver. I don't see it.)

But I'm not sure I understand the requirement. Greater max G3 and max G4 can be derived separately from different combinations of B4, C4 and D4.

##### Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1