Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I should have checked you link first. I assumed that you want the results on
the new sheet to be in the same order as the data on the source sheet. Sub tract() Dim sh As Worksheet, ns As Worksheet, lc As Long Dim lcns As Long Set sh = ActiveSheet Worksheets.Add After:=Sheets(Sheets.Count) Set ns = ActiveSheet lc = sh.Cells(2, Columns.Count).End(xlToLeft).Column n = 2 For i = 2 To lc ns.Cells(2, n) = sh.Cells(2, i) - sh.Cells(9, i) n = n + 1 Next End Sub "caveman.savant" wrote: I would like to create a new worksheet and create values based on an active sheet (example sheet at http://spreadsheets.google.com/ccc?k...5oUSDoqTgI6sRA ) The macro would look at the active sheet and subtract the value of B9 from B2 and put the result into a new sheet at B2. It would continue through each column and row of the 1st sheet until the range is complete. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy rows from one Data sheet to another sheet based on cell conte | Excel Discussion (Misc queries) | |||
Auto Copy/autofill Text from sheet to sheet if meets criteria | Excel Discussion (Misc queries) | |||
Copy Paste from Class Sheet to Filtered List on Combined Sheet | Excel Programming | |||
Help: auto-copy entire rows from 1 sheet (based on cell criteria) to another sheet. | Excel Programming | |||
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. | Excel Discussion (Misc queries) |