Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default VBA - Need macro to find optimal placement of rows in pairs

Hi

I could use some help in programming a macro that calculates the
optimal placement of elements.
I have 50 rows with data. Coloumn B has numbers ranging from
1500-8600. I need a macro that can lookup the coloum with the highest
number and find another row with the highest number which when added
can be no higher than 8600 and copy these two coloumn to another
placement.


Eg.

7.500 mm
7.000 mm
6.800 mm
6.000 mm
5.400 mm
5.400 mm
5.200 mm
3.600 mm
3.600 mm
3.500 mm
2.500 mm
2.400 mm
1.000 mm

It should now take the coloumn with 7.500 mm and see that combined
with the coloumn with 1.000 mm it gives no more than 8600 mm and copy/
cut these two out of the table and then control the next coloumn(7.000
mm) and find if anything goes with together with this still under 8600
mm but as close to ass possible.

Does this make any sense? Hope I haven't confused you too much.
Any help, advise etc. will be welcome...


Greetings Kasper
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default VBA - Need macro to find optimal placement of rows in pairs

On 10 Dec., 15:47, Kasper wrote:
Hi

I could use some help in programming a macro that calculates the
optimal placement of elements.
I have 50 rows with data. Coloumn B has numbers ranging from
1500-8600. I need a macro that can lookup the coloum with the highest
number and find another row with the highest number which when added
can be no higher than 8600 and copy these two coloumn to another
placement.

Eg.

7.500 mm
7.000 mm
6.800 mm
6.000 mm
5.400 mm
5.400 mm
5.200 mm
3.600 mm
3.600 mm
3.500 mm
2.500 mm
2.400 mm
1.000 mm

It should now take the coloumn with 7.500 mm and see that combined
with the coloumn with 1.000 mm it gives no more than 8600 mm and copy/
cut these two out of the table and then control the next coloumn(7.000
mm) and find if anything goes with together with this still under 8600
mm but as close to ass possible.

Does this make any sense? Hope I haven't confused you too much.
Any help, advise etc. will be welcome...

Greetings Kasper


No ideas?
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
Macro to pull data with criterea for placement on a new sheet Trina Excel Discussion (Misc queries) 7 June 13th 08 11:00 PM
Cursor placement without Macro/VBA dwiba New Users to Excel 3 December 20th 07 01:27 PM
Sorting rows by pairs justlearnin Excel Worksheet Functions 5 September 5th 06 10:02 PM
Macro to find and delete rows! Heather O'Malley Excel Discussion (Misc queries) 2 April 12th 06 01:53 PM
Counting Match Pairs In Rows bmb2200 Excel Worksheet Functions 4 August 25th 05 03:35 AM


All times are GMT +1. The time now is 11:06 PM.

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"