PC Review


Reply
Thread Tools Rate Thread

The data for the search should be organized in a single contiguousrange in one column.

 
 
sam
Guest
Posts: n/a
 
      17th Jul 2011
Hi ALL,

I am new to this forum. basically looking for a macro in excel that
would match the values that are opposite and not equal and also in the
same column.
E;g: 100
250
-100
-100
-25
-25

Basically the values should match and the cell highlighted.

I want that values , which are matched are highlighted. In other
world , where the sum =0, then it should match all the relevant values
and highlight's them
Note: the column should be min of 100 lines
the result should show:Highlight 250,-100,-100,-25,-25 , as there sum
=0
100
250
-100
-100
-25
-25


Hope to see a reply soon ....
 
Reply With Quote
 
 
 
 
Sixthsense
Guest
Posts: n/a
 
      18th Jul 2011
Hi Sam,

Read your post once again and check whether you can able to understand
it. If not then It’s impossible for us to understand. Please explain
your data and the expected result clearly for our better
understanding.

---

Sixthsense


On Jul 18, 12:02*am, sam <satya2...@gmail.com> wrote:
> Hi ALL,
>
> I am new to this forum. basically looking for a macro in excel that
> would match the values that are opposite and not equal and also in the
> same column.
> E;g: 100
> 250
> -100
> -100
> -25
> -25
>
> Basically the values should match and the cell highlighted.
>
> I want that values , which are matched are highlighted. In other
> world , where the sum =0, then it should match all the relevant values
> and highlight's them
> Note: the column should be min of 100 lines
> the result should show:Highlight 250,-100,-100,-25,-25 , as there sum
> =0
> 100
> 250
> -100
> -100
> -25
> -25
>
> Hope to see a reply soon ....


 
Reply With Quote
 
Hans Terkelsen
Guest
Posts: n/a
 
      18th Jul 2011

"sam" <(E-Mail Removed)> wrote in message news:e67fe1df-aab1-4a26-9a5f-(E-Mail Removed)...
> Hi ALL,
>
> I am new to this forum. basically looking for a macro in excel that
> would match the values that are opposite and not equal and also in the
> same column.
> E;g: 100
> 250
> -100
> -100
> -25
> -25
>
> Basically the values should match and the cell highlighted.
>
> I want that values , which are matched are highlighted. In other
> world , where the sum =0, then it should match all the relevant values
> and highlight's them
> Note: the column should be min of 100 lines
> the result should show:Highlight 250,-100,-100,-25,-25 , as there sum
> =0
> 100
> 250
> -100
> -100
> -25
> -25
>
>
> Hope to see a reply soon ....



Hi Sam.

As I understand your problem, you want to locate some combination of 100 cells, that add to 0.

For each extra cell the number of possible combinations is multiplied by 2.

20 cells would mean a million combinations to check.
Possible.

To do an exhaustive check of 100 cells would be quite impossible.
And if there is only a few solutions,
it would have to be an exhaustive search of all the combinations.

Many lifetimes of the universe.

Hans T.




 
Reply With Quote
 
Claus Busch
Guest
Posts: n/a
 
      18th Jul 2011
Hi Sam,

Am Sun, 17 Jul 2011 12:02:20 -0700 (PDT) schrieb sam:

> I want that values , which are matched are highlighted. In other
> world , where the sum =0, then it should match all the relevant values
> and highlight's them
> Note: the column should be min of 100 lines
> the result should show:Highlight 250,-100,-100,-25,-25 , as there sum
> =0
> 100
> 250
> -100
> -100
> -25
> -25


your values in A2:A120. Then in A1:
=SUM(A2:A120)
in B2:B120 enter 0
and in B1:
=A1-SUMPRODUCT(A2:A120,B2:B120)
Start Solver => target cell B1 with value 0, changeable cells B2:B120,
conditions B2:B120 >=0, B2:B120 <=1, B2:B120 Integer
When solver has finished in B2:B120 are 0 and 1. Highlight all cells in
A2:A120 if in column B = 0.


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Plotting multiple Y column data versus single X column in Excel 20 RossM Microsoft Excel Charting 3 28th Jun 2009 01:39 AM
Search for a column based on the column header and then past data from it to another column in another workbook minkokiss Microsoft Excel Programming 2 5th Apr 2007 01:12 AM
Based on a condition in one column, search for a year in another column, and display data from another column in the same row >> look MPSingley@midamerican.com Microsoft Excel Programming 2 30th Dec 2006 06:23 PM
Based on a condition in one column, search for a year in another column, and display data from another column in the same row >> look MPSingley@midamerican.com Microsoft Excel Misc 0 27th Dec 2006 04:31 PM
Return Single Row of Numeric Data to Single Column Sam via OfficeKB.com Microsoft Excel Worksheet Functions 4 17th Dec 2005 12:31 AM


Features
 

Advertising
 

Newsgroups
 


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