LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #19   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Macro to Saved Selected Excel data to .CSV format

I'm not sure how you got Ref errors in some of the formulas.

But make sure your look up table is wide enough to retrieve the column you want.

for instance:
=vlookup(a1,sheet2!a:e,6,false)
will return that #Ref! error, since I'm trying to bring back the 6th column of a
5 column range.

If you have trouble fixing your formula, include it in your reply.

And Debra Dalgleish has notes for =vlookup():
http://www.contextures.com/xlFunctions02.html

Gocool wrote:

thanks for the pointer.. I tried with VLOOKUP() for a range of cells. its
working fine.. for few fields its end up showing #REF in case of
error/incorrect match. I need these cells to be empty cells. HOW do i do this?

"Dave Peterson" wrote:

I'm not sure I understand, but if you can use =vlookup() manually, you could use
a macro that did the same kind of thing.

Gocool wrote:

I have master & child file in which records are available as below..

Master file

Col1 Col2 Col3 Col4
HQ_1 xyz abc
HQ_3 hhh abc
HQ_4 lkd

Child File

Col1 Col2 Col3 Col4 Col5 Col6
HQ_1 121 test xyz abc
HQ_2 2 dev
HQ_3 34 dev hhh abc
HQ_4 24 test lkd

col2 & col3 of Master file has to be added to child as col4 and col5 in
respective rows.

How can i do this?? is there a way to do this using MACRO???

kindly please help me

"Dave Peterson" wrote:

If you just want to create the file without asking...

..SaveAs Filename:="C:\temp\mynamehere.csv", FileFormat:=xlCSV
becomes
..SaveAs Filename:="C:\temp\mynamehere" _
"_" & format(date, "yyyy_mm_dd") & ".csv", FileFormat:=xlCSV

This would be used in the first suggested code. Not the one that allows the
user to choose a name.

Gocool wrote:

Hi Dave,

Same query but I have to save with the filename appended with current date.

pls. help

thanks

"Dave Peterson" wrote:

Did it work when you tried it?

joelbeveridge wrote:

Yea its always going to be N11:W36 that needs to be copied and saved to
csv format. If it can do that ill be so happy i might cry..lol

--
joelbeveridge
------------------------------------------------------------------------
joelbeveridge's Profile: http://www.excelforum.com/member.php...o&userid=37045
View this thread: http://www.excelforum.com/showthread...hreadid=567765

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PAUSE EXCEL MACRO FOR INPUT OF DATA VARIABLE lynne b Excel Discussion (Misc queries) 3 September 11th 06 03:37 PM
In EXCEL 2002 format cell with existing data. greg1090 Excel Discussion (Misc queries) 1 July 19th 06 10:51 PM
Numbers/Text data missing from excel to excel query? RAMAERTE Excel Discussion (Misc queries) 0 May 8th 06 05:05 PM
Retrieve data from separate Excel session JessK Charts and Charting in Excel 2 March 27th 06 01:34 AM
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM


All times are GMT +1. The time now is 11:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"