Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is what I have:
Columns("H:H").Select LastRow = Cells(Rows.Count, "H").End(xlUp).Row Cells(LastRow + 2, "H") = Application.Sum _ (Range(Cells(1, "H"), Cells(LastRow, "H"))) This sums the entire row in am empty cell two spaces below the last cell with a value in it. Dim LastRow As Long With ActiveSheet LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row .Range("e2:E" & LastRow).Formula = "=$d2/$d$49" This formula is what I have. This figures the percent by dividing d2 into D49, which happens to be the sum column in my current data, then auto fills it into all subsequent cells of that column to the bottom of the cells with values. I want to take that resulting Sum of the first formula value and incorporate it into a formula to calculate percentage that is not specific to tose cells. BECAUSE, when I import new data from other places it may have more or less rows. SO how can I figure the percentage using the resulting value of the first formula???? THANKS!!! If you need clarification, please ask :) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
l1 = .Cells(.Rows.Count, "d").End(xlUp).Row
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row .Range("e2:E" & LastRow).Formula = "=$d2/$d$" & l1 perhaps. -- Regards, Tom Ogilvy "bodhisatvaofboogie" wrote: This is what I have: Columns("H:H").Select LastRow = Cells(Rows.Count, "H").End(xlUp).Row Cells(LastRow + 2, "H") = Application.Sum _ (Range(Cells(1, "H"), Cells(LastRow, "H"))) This sums the entire row in am empty cell two spaces below the last cell with a value in it. Dim LastRow As Long With ActiveSheet LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row .Range("e2:E" & LastRow).Formula = "=$d2/$d$49" This formula is what I have. This figures the percent by dividing d2 into D49, which happens to be the sum column in my current data, then auto fills it into all subsequent cells of that column to the bottom of the cells with values. I want to take that resulting Sum of the first formula value and incorporate it into a formula to calculate percentage that is not specific to tose cells. BECAUSE, when I import new data from other places it may have more or less rows. SO how can I figure the percentage using the resulting value of the first formula???? THANKS!!! If you need clarification, please ask :) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculating a Percent based on Tiered criteria | Excel Discussion (Misc queries) | |||
Sorting High to Low based on percent of total | Excel Discussion (Misc queries) | |||
Formatting a number to look like a Percent without a percent sign | Excel Discussion (Misc queries) | |||
calculate commission $ based on total sold and commission percent | Excel Programming | |||
how do you set auto shading of cell based on percent value in exc. | Excel Worksheet Functions |