Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 42
Default subtracting the highlighted ones

i just want to how can we subtract the highlighted ones from the total.

eg:
1256 sdkjfs
1236 dfsdf
2569 dfsdfs
2669 dfsdfs
3214 dfsdf
2200 sdfsdf
1230 dfsdfsdf

when i highlight the 2nd column each time i want the 1st column to be
subtracted from the total(all the highlighted ones).

thank you

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,365
Default subtracting the highlighted ones

We need some more info here, like where's the total at? I assume that the
sdkjfs entries are the ones you're going to highlight since it seems rather
difficult to subtract numbers from letters.

There is NO worksheet function to detect whether or not a cell is
highlighted, shaded, bordered, or has specially colored text. To do what you
want would require a macro. Now, what you could consider doing is adding in
a couple of helper columns:

Assuming that the numbers are in column A, those letters in column B, you
could set something up like this: In column C, next to the sdkjfs entries
and tell you users to put an X in them for values not to include in the
total. In column D put a formula like this (again, assumes 1256 sdkjfs is on
row 1)
=IF(C1<"",0,A1)
This is actually a cheat, user could enter anything, an X or a or any
character to exclude the value from the total. Fill the formula down the
sheet. Hide column D. Where you have your total being calculated now and
may have a formula something like
=SUM(A1:A7)
change it to
=SUM(D1:D7)
now it totals the non-excluded numbers, without a single line of code.

"ganga" wrote:

i just want to how can we subtract the highlighted ones from the total.

eg:
1256 sdkjfs
1236 dfsdf
2569 dfsdfs
2669 dfsdfs
3214 dfsdf
2200 sdfsdf
1230 dfsdfsdf

when i highlight the 2nd column each time i want the 1st column to be
subtracted from the total(all the highlighted ones).

thank you

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
Subtracting [email protected] Excel Discussion (Misc queries) 3 February 18th 07 05:07 AM
Subtracting petrino Charts and Charting in Excel 2 January 9th 07 08:56 AM
Subtracting Josh Davis Excel Discussion (Misc queries) 3 June 16th 06 06:54 PM
Highlighted ED New Users to Excel 5 April 13th 06 09:31 PM
Subtracting One Sum From Another R. U. Sirius New Users to Excel 3 September 27th 05 06:47 PM


All times are GMT +1. The time now is 01:59 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"