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

Hi

I have following requirement:

I have four numbers 2, 8, 10 and 11. I have one equation:

(n1+n2)*n3+n4

I have to find out result of this equation for all combinations of numbers.

There will be total 16 such combinations and results. But how can I do it in
macro. I can write a6 conditions, but do not want to do it. Is there any
other method to do this?

Thank you in advance.

Regards,
prm
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Macro question

Hi,

Before attempting this we need to be clear on the question

2, 8, 10, 11

Of these numbers there is 1 Combination and 24 permutations so which 16 of
the 24 permutations are we to use or am I misunderstanding the question?

Mike

"Pawan" wrote:

Hi

I have following requirement:

I have four numbers 2, 8, 10 and 11. I have one equation:

(n1+n2)*n3+n4

I have to find out result of this equation for all combinations of numbers.

There will be total 16 such combinations and results. But how can I do it in
macro. I can write a6 conditions, but do not want to do it. Is there any
other method to do this?

Thank you in advance.

Regards,
prm

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Macro question

We have to find all possibilities.. e.g.

(n1+n2)*n3+n4

n1 will assume all possible values and at the same time all other variables
will too... any number can be at any place at any given time and we need to
find result for all such possibilities

"Mike H" wrote:

Hi,

Before attempting this we need to be clear on the question

2, 8, 10, 11

Of these numbers there is 1 Combination and 24 permutations so which 16 of
the 24 permutations are we to use or am I misunderstanding the question?

Mike

"Pawan" wrote:

Hi

I have following requirement:

I have four numbers 2, 8, 10 and 11. I have one equation:

(n1+n2)*n3+n4

I have to find out result of this equation for all combinations of numbers.

There will be total 16 such combinations and results. But how can I do it in
macro. I can write a6 conditions, but do not want to do it. Is there any
other method to do this?

Thank you in advance.

Regards,
prm

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
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
Macro question. brandon roland[_2_] Excel Programming 4 August 9th 07 02:52 PM
MACRO QUESTION HELP Excel Discussion (Misc queries) 1 May 26th 06 05:59 PM
Question about macro Jason Excel Discussion (Misc queries) 0 April 27th 05 10:37 PM
one more macro question Michael A Excel Programming 1 March 7th 05 04:02 AM


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

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

About Us

"It's about Microsoft Excel"