![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 90
|
Hi,
I need to format a cell using a macro so that when I save the sheet to a .csv file and I view it in notepad I get ...,"",... for that cell(where ... is the data before and after the two quotes) I've tried: ActiveCell.FormulaR1C1 = "" When I export I get two commas next to each other: ...,,... Then I tried: ActiveCell.FormulaR1C1 = """ But the code was auto corrected to put in four quotes. The VB editor would not let me have just 3. Finnaly tried: ActiveCell.FormulaR1C1 = """" Result after export: ...,"""",... Can someone please let me know how I can just get the 2 quotes? Thanks!
__________________
SteveD |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
[ This Message was edited by: Mark W. on 2002-02-21 13:14 ] |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Posts: 90
|
Thanks... but
Now when I export I receive: ...,"""""",... I'm looking for: ...,"",... Thanks for your help!
__________________
SteveD |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Steve, I don't think it can be done!!! What are you trying to achieve?
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Posts: 90
|
I'm exporting this sheet so I can query it against a database. I need to link this field to an existing field whose value is "".
Anyone else have any ideas?
__________________
SteveD |
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
I'd just enter " into the cells where you want "". Save as .CSV and then edit the file replacing all occurances of "" with ".
[ This Message was edited by: Mark W. on 2002-02-21 13:41 ] |
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Feb 2002
Posts: 90
|
Ya, I thought of that.
I was hoping that I would have Excel do this for me. I'm trying to wirte this to hand it off and want to make it as fool proof as possible. Thanks again.
__________________
SteveD |
|
|
|
|
|
#8 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
Don't know if it'll help, but try replacing the "" with vbNullString
_________________ Regards, Juan Pablo G. MrExcel.com Consulting [ This Message was edited by: Juan Pablo G. on 2002-02-21 17:26 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|