Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
entering formulas on a sheet
Hi
I have a sheet which is created from a search of a much larger sheet. the number of rows can vary from 1 to XXX. I would like to do a sum of the columns and have it placed on the next empty row. I have tried using the ..formula = "=sum(c3:C"+variable+")" in a loop but just get mismatch errors. any help would be gratefully appreciated. Regards Stu |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
entering formulas on a sheet
Wouldn't it just be easier to put the sum at the top?
-- Don Guillett SalesAid Software "stu" wrote in message s.com... Hi I have a sheet which is created from a search of a much larger sheet. the number of rows can vary from 1 to XXX. I would like to do a sum of the columns and have it placed on the next empty row. I have tried using the .formula = "=sum(c3:C"+variable+")" in a loop but just get mismatch errors. any help would be gratefully appreciated. Regards Stu |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
entering formulas on a sheet
It doesn't matter where I put it. The problem I am having is getting the
formula =sum(c3:CXXX) where for that column XXX is unknown until the sheet has been created by a search and copy/paste macro. Stuart "Don Guillett" wrote in message ... Wouldn't it just be easier to put the sum at the top? -- Don Guillett SalesAid Software "stu" wrote in message s.com... Hi I have a sheet which is created from a search of a much larger sheet. the number of rows can vary from 1 to XXX. I would like to do a sum of the columns and have it placed on the next empty row. I have tried using the .formula = "=sum(c3:C"+variable+")" in a loop but just get mismatch errors. any help would be gratefully appreciated. Regards Stu |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
entering formulas on a sheet
sub SetupSums()
Dim rng as Range for i = 1 to 10 set rng = cells(rows.count,i).End(xlup)(2) rng.FormulaR1C1 = "=Sum(R3C:R[-1]C)" Next End Sub change 10 to the number of columns to process. "stu" wrote in message s.com... Hi I have a sheet which is created from a search of a much larger sheet. the number of rows can vary from 1 to XXX. I would like to do a sum of the columns and have it placed on the next empty row. I have tried using the .formula = "=sum(c3:C"+variable+")" in a loop but just get mismatch errors. any help would be gratefully appreciated. Regards Stu |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
entering formulas on a sheet
if you want it at the top, then you don't care where the bottom is
Range("A1:M1").Formula = "=Sum(A3:A65536)" -- regards, tom Ogilvy "stu" wrote in message s.com... It doesn't matter where I put it. The problem I am having is getting the formula =sum(c3:CXXX) where for that column XXX is unknown until the sheet has been created by a search and copy/paste macro. Stuart "Don Guillett" wrote in message ... Wouldn't it just be easier to put the sum at the top? -- Don Guillett SalesAid Software "stu" wrote in message s.com... Hi I have a sheet which is created from a search of a much larger sheet. the number of rows can vary from 1 to XXX. I would like to do a sum of the columns and have it placed on the next empty row. I have tried using the .formula = "=sum(c3:C"+variable+")" in a loop but just get mismatch errors. any help would be gratefully appreciated. Regards Stu |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Entering Formulas | Excel Worksheet Functions | |||
Entering Formulas | Excel Discussion (Misc queries) | |||
Entering Formulas | Excel Worksheet Functions | |||
Entering formulas | Excel Worksheet Functions | |||
entering formulas | Excel Worksheet Functions |