Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding to a formula
I have a workbook with 2 worksheets. Each cell (10 rows by 25 columns worth)
in the last worksheet adds the value from the corresponding cell in the first worksheet to a constant number (e.g. sheetlast.cell(A1) = sheet1.cell(A1)+5). I have created a maco to make a copy of the first worksheet for a total of 3 worksheets. I want to add to the macro to update the formulas in the last worksheet to look something like this sheetlast.cell(A1) = sheet1.cell(A1)+sheet2.cell(A1) + 5. Anyone ideas how to do? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding to a formula
Thanks Tom. Could I use this Sheets(Sheets.Count).Name To determine the
last sheet name? Would it then look like =Sum(First:Sheets(Sheets.Count).Name!A1)+5 ---------------------------------------------------------------------------------------- "Tom Ogilvy" wrote: why not make five sheets adding a sheet named first and a sheet named last (leave these blank). then put the sheets to be summed between the first and last sheets in the tab order. So the tabs would look like First Sheet1 Sheet2 Last Summary then in A1 of the summary sheet put =Sum(First:Last!A1)+5 then drag fill down 10 and across 15 Now whenever you add a sheet, put it somewhere between first and last and it will be included in the sum. -- Rgards, Tom Ogilvy "Scott" wrote: I have a workbook with 2 worksheets. Each cell (10 rows by 25 columns worth) in the last worksheet adds the value from the corresponding cell in the first worksheet to a constant number (e.g. sheetlast.cell(A1) = sheet1.cell(A1)+5). I have created a maco to make a copy of the first worksheet for a total of 3 worksheets. I want to add to the macro to update the formulas in the last worksheet to look something like this sheetlast.cell(A1) = sheet1.cell(A1)+sheet2.cell(A1) + 5. Anyone ideas how to do? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding to a formula
No. You are mixing VBA with Worksheet formulas.
-- Regards, Tom Ogilvy "Scott" wrote in message ... Thanks Tom. Could I use this Sheets(Sheets.Count).Name To determine the last sheet name? Would it then look like =Sum(First:Sheets(Sheets.Count).Name!A1)+5 ---------------------------------------------------------------------------------------- "Tom Ogilvy" wrote: why not make five sheets adding a sheet named first and a sheet named last (leave these blank). then put the sheets to be summed between the first and last sheets in the tab order. So the tabs would look like First Sheet1 Sheet2 Last Summary then in A1 of the summary sheet put =Sum(First:Last!A1)+5 then drag fill down 10 and across 15 Now whenever you add a sheet, put it somewhere between first and last and it will be included in the sum. -- Rgards, Tom Ogilvy "Scott" wrote: I have a workbook with 2 worksheets. Each cell (10 rows by 25 columns worth) in the last worksheet adds the value from the corresponding cell in the first worksheet to a constant number (e.g. sheetlast.cell(A1) = sheet1.cell(A1)+5). I have created a maco to make a copy of the first worksheet for a total of 3 worksheets. I want to add to the macro to update the formulas in the last worksheet to look something like this sheetlast.cell(A1) = sheet1.cell(A1)+sheet2.cell(A1) + 5. Anyone ideas how to do? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding formula | Excel Worksheet Functions | |||
Adding on to a formula | Excel Worksheet Functions | |||
adding a formula including the value another formula gets | Excel Discussion (Misc queries) | |||
Formula help : adding | New Users to Excel | |||
Adding another formula to and Exsiting Formula | Excel Programming |