Reconcile Values In VBA

lewisgmorris

Board Regular
Joined
Oct 23, 2014
Messages
119
Hi All,

I have tried and tried to work my head around making lists of all unique permutations of a list of values that equal x but no luck. If any one has any idea I would apprecate it.

Its like a brute force algorithm for passwords I guess but i cant work out how to only use each value once.

Any help appreciated.

IE

TOTAL £3000

VALUES

£500
£200
£200
£100
£250
£350
£100
£275
£375
£300
£3000
£1000
£1000
£2000


ANSWER (could be multiple)

£3000,

£1000+£2000,

£1000,£1000,£200,£200,£100,£500
 

lewisgmorris

Board Regular
Joined
Oct 23, 2014
Messages
119
nothing ??

Hi All,

I have tried and tried to work my head around making lists of all unique permutations of a list of values that equal x but no luck. If any one has any idea I would apprecate it.

Its like a brute force algorithm for passwords I guess but i cant work out how to only use each value once.

Any help appreciated.

IE

TOTAL £3000

VALUES

£500
£200
£200
£100
£250
£350
£100
£275
£375
£300
£3000
£1000
£1000
£2000


ANSWER (could be multiple)

£3000,

£1000+£2000,

£1000,£1000,£200,£200,£100,£500
 

Eric W

MrExcel MVP
Joined
Aug 18, 2015
Messages
9,001

lewisgmorris

Board Regular
Joined
Oct 23, 2014
Messages
119
You're a hero. I remember seeing the first link before!

Thank you.

I have no idea how its working but Its working.
 

Forum statistics

Threads
1,082,447
Messages
5,365,574
Members
400,838
Latest member
Renedescartes

Some videos you may like

This Week's Hot Topics

Top