Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Functions and Ranges
The following code is an exerpt from an Access module that drops records into Excel. Once in Excel I want to run functions on the entire column of data like sum(c1:c52), but come up with errors. Any thoughts? Thanks in advance, Forrest
' to the Microsoft Excel spreadsheet. Do Until Rs.EOF For i = 0 To Rs.Fields.Count - 1 CurrentField = Rs(i) Sheet.cells(j, i + 1).Value = CurrentField Next i Rs.MoveNext j = j + 1 Loop ' Sum range of cells. Sheet.cells(j, i).Value = Sheet.range("C50").Value + _ Sheet.range("c51").Value |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Functions and Ranges
why not just use
..Range("C2").CopyFromRecordset Rs Patrick Molloy Microsoft Excel MVP -----Original Message----- The following code is an exerpt from an Access module that drops records into Excel. Once in Excel I want to run functions on the entire column of data like sum (c1:c52), but come up with errors. Any thoughts? Thanks in advance, Forrest ' to the Microsoft Excel spreadsheet. Do Until Rs.EOF For i = 0 To Rs.Fields.Count - 1 CurrentField = Rs(i) Sheet.cells(j, i + 1).Value = CurrentField Next i Rs.MoveNext j = j + 1 Loop ' Sum range of cells. Sheet.cells(j, i).Value = Sheet.range("C50").Value + _ Sheet.range("c51").Value . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If functions Looking at ranges | Excel Discussion (Misc queries) | |||
IF functions and Names Ranges | Excel Discussion (Misc queries) | |||
Copy and SUM functions with different ranges | Excel Worksheet Functions | |||
if functions with more than 7 ifs (ranges are possible?) | Excel Worksheet Functions | |||
Functions and Ranges | Excel Programming |