Import CSV File and include formulas

travelingwilly

New Member
Joined
Jun 19, 2002
Messages
24
Hello folks

I wish to create a flat file with Formulas so that excel translates properly. I know that if I put =("00001") it will be be translated in the spreadsheet as 00001 instead of automaticly thinking it is a number and converting to a number 1 . But I am sure you can do the same thing with formulas....

example of csv

=("00001"),34,34,21,=formula(r[1]c[-3]+r[1]c[-3])
=("00002"),34,34,21,=formula(r[1]c[-3]+r[1]c[-3])
=("00003"),34,34,21,=formula(r[1]c[-3]+r[1]c[-3])
,,,,=sum(r[1]c[1]:r[3]c[1])

Or somthing like that. Is there away to this.
Basicly I want the formula to be used not the value so when it is loaded I can change a value and I will see the change without adjusting the sheet...

Make sense ???
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
travelingwilly,

You can if you are reading in the .csv file via a VBA procedure... how are you loading the file into Excel?
 
Upvote 0
Try this...

="00001",34,34,21,=rc[-3]+rc[-3]
="00002",34,34,21,=rc[-3]+rc[-3]
="00003",34,34,21,=rc[-3]+rc[-3]
,,,,=sum(r[-1]c:r[-3]c)

...but, before you do make sure that the R1C1 reference style is set. See the Tools | Options... menu command's General tab.
 
Upvote 0
That works great. It is unfortunate that you have to use the RC reference to have it work properly. But at least you can Download actual Formula to a spreadsheet. Or is there anouther way using maybe XML ???
 
Upvote 0
Not quite sure why you've concluded that you must use the R1C1 reference style.

This works too...

1000,2000
1500,2500
=SUM(A1:A2),=SUM(B1:B2)
 
Upvote 0
Thanks I was thinking about using RC because it was easer to program . But now that I think of it it seems easier with the Col References.
 
Upvote 0

Forum statistics

Threads
1,214,545
Messages
6,120,128
Members
448,947
Latest member
test111

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top