Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting rows from "unstable" csv
Folks,
I have the function below, which imports values from a column in a csv that is generated elsewhere, and places the values in an empty row in my spreadsheet. However, as it stands, when the column in the CSV is updated with the next set of results, ALL generated rows are updated with the latest values. What I need the function to do is to insert a "snapshot" of the csv at that moment - ie, when the CSV changes, previous rows in the xls are unaffected. Any clues? Thanks Steve =======CODE========= Sub LatestRun() ActiveCell.Offset(1, 0).Select Do While Not IsEmpty(ActiveCell) ActiveCell.Offset(1, 0).Select Loop ActiveCell.FormulaR1C1 = "=today()" For x = 2 To 17 ActiveCell.Offset(0, 1).Select ActiveCell.Formula = "='C:\[rip-perform.csv]rip-perform'!$C$" & x 'ActiveCell.FormulaR16C1 = "='rip-perform.csv'!R2C1:R2C17" Next End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting rows from "unstable" csv
Renster wrote:
*** Rubbish mostly, that is now snipped *** No matter folks, I cracked it myself. Revised Function: Sub LatestRun() ActiveCell.Offset(1, 0).Select Do While Not IsEmpty(ActiveCell) ActiveCell.Offset(1, 0).Select Loop ActiveCell.FormulaR1C1 = "=today()" For x = 2 To 17 ActiveCell.Offset(0, 1).Select ActiveCell.Formula = "='C:\[rip-perform.csv]rip-perform'!$C$" & x ActiveCell.Copy ActiveCell.PasteSpecial (xlPasteValues) Next End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting rows from "unstable" csv
Renster wrote:
*** Rubbish mostly, that is now snipped *** No matter folks, I cracked it myself. Revised Function: Sub LatestRun() ActiveCell.Offset(1, 0).Select Do While Not IsEmpty(ActiveCell) ActiveCell.Offset(1, 0).Select Loop ActiveCell.FormulaR1C1 = "=today()" For x = 2 To 17 ActiveCell.Offset(0, 1).Select ActiveCell.Formula = "='C:\[rip-perform.csv]rip-perform'!$C$" & x ActiveCell.Copy ActiveCell.PasteSpecial (xlPasteValues) Next End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inserting Rows...but losing "FORMAT" | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
inserting a conditional "go to" command on a excel "if" function | Excel Worksheet Functions | |||
Inserting "template" rows | Excel Programming |