First, I should point out I'm using Excel for Mac.
So I've gone to File, Import, CSV file, selected the file and it has imported successfully on my spreadsheet. I've also got a Macro set up so every few seconds it checks for updates and refreshes the imported data.
I'm trying to make it so if any cell in column F is changed on the spreadsheet then these changes are reflected on the CSV file that was imported. So it's a kind of 2 way street, if you change the CSV file it will be changed in the spreadsheet and if you change it on the spreadsheet it will change on the CSV file.
Is there only way to do this to use VBA to overwrite the CSV file with the amended spreadsheet data?
I found this code which I used which allowed me to write a new CSV
But I can't seem to figure out how to set a range so it works from A6 to J & EndRow... right now it's just specifying each column and row individually
Would appreciate any help anyone can give! Thanks[/FONT]
So I've gone to File, Import, CSV file, selected the file and it has imported successfully on my spreadsheet. I've also got a Macro set up so every few seconds it checks for updates and refreshes the imported data.
I'm trying to make it so if any cell in column F is changed on the spreadsheet then these changes are reflected on the CSV file that was imported. So it's a kind of 2 way street, if you change the CSV file it will be changed in the spreadsheet and if you change it on the spreadsheet it will change on the CSV file.
Is there only way to do this to use VBA to overwrite the CSV file with the amended spreadsheet data?
I found this code which I used which allowed me to write a new CSV
Code:
[FONT=Helvetica]Dim My_filenumber As Integer[/FONT]
[FONT=Helvetica]Dim logSTR As String[/FONT]
[FONT=Helvetica]
[/FONT]
[FONT=Helvetica]My_filenumber = FreeFile[/FONT]
[FONT=Helvetica]
[/FONT]
[FONT=Helvetica]logSTR = logSTR & Cells(1, "A").Value & " , "[/FONT]
[FONT=Helvetica]logSTR = logSTR & Cells(2, "A").Value & " , "[/FONT]
[FONT=Helvetica]logSTR = logSTR & Cells(3, "A").Value & " , "[/FONT]
[FONT=Helvetica]logSTR = logSTR & Cells(4, "A").Value & vbCr[/FONT]
[FONT=Helvetica]logSTR = logSTR & Cells(3, "A").Value[/FONT]
[FONT=Helvetica]
[/FONT]
[FONT=Helvetica]
[/FONT]
[FONT=Helvetica]
[/FONT]
[FONT=Helvetica]Open "/Users/samb/Documents\test.csv" For Append As [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=My_filenumber]#My_filenumber[/URL] [/FONT]
[FONT=Helvetica] Print [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=My_filenumber]#My_filenumber[/URL] , logSTR[/FONT]
[FONT=Helvetica]Close [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=My_filenumber]#My_filenumber[/URL] [/FONT]
[FONT=Helvetica]
[/FONT]
[FONT=Helvetica]End Sub
But I can't seem to figure out how to set a range so it works from A6 to J & EndRow... right now it's just specifying each column and row individually
Would appreciate any help anyone can give! Thanks[/FONT]