Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default Add up to zero

I have two columns populated with numbers. Few numbers are positive and few
are negative.

I need to add these numbers together and bring the total to zero.

If total of any number of cells of column one is equal to the total of any
number of cells of second column then i

need to shade those cells.

I can do bit of coding in excel, please help me with a code or login to this
situation.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default Add up to zero

I forgot to say thanks for the help.

Boss

"Boss" wrote:

I have two columns populated with numbers. Few numbers are positive and few
are negative.

I need to add these numbers together and bring the total to zero.

If total of any number of cells of column one is equal to the total of any
number of cells of second column then i

need to shade those cells.

I can do bit of coding in excel, please help me with a code or login to this
situation.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default Add up to zero

"Boss" wrote:

I have two columns populated with numbers. Few numbers are positive and few
are negative.

I need to add these numbers together and bring the total to zero.

Are you saying that you need to force the total of A1:B1 to zero by changing
one of the two cells?


If total of any number of cells of column one is equal to the total of any
number of cells of second column then i

need to shade those cells.


Are you saying that if the value in cell A1 = B2 then shade both those cells?


I can do bit of coding in excel, please help me with a code or login to this
situation.


PJ
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default Add up to zero

Hi,

Thanks for the reply... But what i want is something different.

Col A Col B
23 34
4456 4417
5687 39
56 234
235 567
-56 23

For example we have two columns Col A and Col B.

Now +56 in Col A should get shaded with -56 of Col A

and

+23 of Col A should get shaded with +23 of Col B
+4456 of Col A should get shaded with (4417+39) of Col B

I feel this as tuff, but please help me with some clue so that i can move
forward in coding.

Thanks!
Boss

"PJFry" wrote:

"Boss" wrote:

I have two columns populated with numbers. Few numbers are positive and few
are negative.

I need to add these numbers together and bring the total to zero.

Are you saying that you need to force the total of A1:B1 to zero by changing
one of the two cells?


If total of any number of cells of column one is equal to the total of any
number of cells of second column then i

need to shade those cells.


Are you saying that if the value in cell A1 = B2 then shade both those cells?


I can do bit of coding in excel, please help me with a code or login to this
situation.


PJ

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default Add up to zero

What you are looking to do is beyond my scope of experience.

The problem lies mainly in the second scenario. You will need to evaluate
each combination of numbers and compare that result with your target number.
In your example of +4456 of Col A should get shaded with (4417+39) of Col B,
you could have an instance of 4456 = (4410+46). How could you tell these
apart?

The first scenario could possibly be accomplished by looping through your
range and comparing each value that is not shaded to the target. If there is
a match, color the cell, if no match, continue looping. But rather than
coloring the cell, it may make more sense to flag a third column with a
number. That way you can sort on the 1, 2, 3, etc. While Excel 2007 can
sort on colors, it is easy to confuse red with an almost red shade.

Sorry I could not be more help.

--
Regards,

PJ
Please rate this post using the vote buttons if it was helpful.



"Boss" wrote:

Hi,

Thanks for the reply... But what i want is something different.

Col A Col B
23 34
4456 4417
5687 39
56 234
235 567
-56 23

For example we have two columns Col A and Col B.

Now +56 in Col A should get shaded with -56 of Col A

and

+23 of Col A should get shaded with +23 of Col B
+4456 of Col A should get shaded with (4417+39) of Col B

I feel this as tuff, but please help me with some clue so that i can move
forward in coding.

Thanks!
Boss

"PJFry" wrote:

"Boss" wrote:

I have two columns populated with numbers. Few numbers are positive and few
are negative.

I need to add these numbers together and bring the total to zero.

Are you saying that you need to force the total of A1:B1 to zero by changing
one of the two cells?


If total of any number of cells of column one is equal to the total of any
number of cells of second column then i

need to shade those cells.


Are you saying that if the value in cell A1 = B2 then shade both those cells?


I can do bit of coding in excel, please help me with a code or login to this
situation.


PJ

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



All times are GMT +1. The time now is 06:35 AM.

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"