LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 177
Default Sum Relative Number of Cells in Column

Hi, the code below comes filters a column to return all values equal to or
above 0.001.

Then the code is supposed to take a number in cell B464 and subtract the sum
of all values in the range above (which should be equal to or above 0.001)
but I can't get it to work, it always sums the wrong cells...

Any help? Thanks very much.


-- the broken part:

(note: B463 is between the Total Value in B464, and all the other values in
B7:B462 -- but about half of these values have already been filtered out.
Basically the point is I'm trying to get balance of all values less than
0.001 with this formula. So if the total is 500, and the values above .001 =
400, then the balance is 100.)

Range("B463").Select
ActiveCell.FormulaR1C1 = "=R[1]C-SUM(R[-308]C:R[-6]C)"


The entire code:

Range("C6").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="=.001", Operator:=xlAnd
Range("A6").Select
Selection.End(xlDown).Select
Range("A463").Select
ActiveCell.FormulaR1C1 = "Other"
Range("B463").Select
ActiveCell.FormulaR1C1 = "=R[1]C-SUM(R[-308]C:R[-6]C)"
Range("C463").Select
ActiveCell.FormulaR1C1 = "=RC[-1]/R[1]C[-1]"
Range("D463").Select
ActiveCell.FormulaR1C1 = "=1-R[-154]C"
 
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
Sum multiple cells if a column has a certain number in it Cloughitup Excel Worksheet Functions 4 October 18th 08 05:38 PM
Count number of cells and total in one column, based on another column suffix Pierre Excel Worksheet Functions 5 October 31st 07 12:28 AM
When I make a row absolute, but column relative, the column stays. tonefbr Excel Discussion (Misc queries) 3 October 9th 07 11:17 PM
Column picked randomly with probability relative to number of entr Neil Goldwasser Excel Worksheet Functions 4 May 30th 06 08:55 AM
how do i number cells in a column from 1-506 in excel newbieone New Users to Excel 2 March 16th 06 09:38 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"