Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default import data without openning excel workbook

hi All,
How to import a data from a excel workbook without opening the book.
lets say book name "mybook" location is:"C:\Documents and
Settings\BahadiAkcan\My Documents"
using above file can I make a match or vlookup function in a code?
thanks for your help

--
Regards,
Baha
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default import data without openning excel workbook

Here is the basic syntax. Adapt to your vlookup and modify to suit

=SUMPRODUCT(('C:\yourfolder\[yourfile.xls]yoursheet'!$E$7:$E$1000=1)*1)

--
Don Guillett
SalesAid Software

"Baha" wrote in message
...
hi All,
How to import a data from a excel workbook without opening the book.
lets say book name "mybook" location is:"C:\Documents and
Settings\BahadiAkcan\My Documents"
using above file can I make a match or vlookup function in a code?
thanks for your help

--
Regards,
Baha



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default import data without openning excel workbook

Thank you for the tip,but i was trying to put in a VBA code
so far I tried this but couldn`t figure out the proper one
sub getTheData()
dim x as long
x = Application.WorksheetFunction.VLookup(D7, "C:\Documents and
Settings\BahadiAkcan\My Documents\Book1hhhfhfh.xls" .Sheet1.Range("a1:d33"),
3, 0)
msgbox x
end sub

can you give me a hint please?

--
Regards,
Baha


"Don Guillett" wrote:

Here is the basic syntax. Adapt to your vlookup and modify to suit

=SUMPRODUCT(('C:\yourfolder\[yourfile.xls]yoursheet'!$E$7:$E$1000=1)*1)

--
Don Guillett
SalesAid Software

"Baha" wrote in message
...
hi All,
How to import a data from a excel workbook without opening the book.
lets say book name "mybook" location is:"C:\Documents and
Settings\BahadiAkcan\My Documents"
using above file can I make a match or vlookup function in a code?
thanks for your help

--
Regards,
Baha




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default import data without openning excel workbook

hi,
i think I get my answer from other site. Thank you any way.Any one intrested
this
question;here is the link that u can get the answer
http://www.rondebruin.nl/copy7.htm

--
Regards,
Baha


"Baha" wrote:

Thank you for the tip,but i was trying to put in a VBA code
so far I tried this but couldn`t figure out the proper one
sub getTheData()
dim x as long
x = Application.WorksheetFunction.VLookup(D7, "C:\Documents and
Settings\BahadiAkcan\My Documents\Book1hhhfhfh.xls" .Sheet1.Range("a1:d33"),
3, 0)
msgbox x
end sub

can you give me a hint please?

--
Regards,
Baha


"Don Guillett" wrote:

Here is the basic syntax. Adapt to your vlookup and modify to suit

=SUMPRODUCT(('C:\yourfolder\[yourfile.xls]yoursheet'!$E$7:$E$1000=1)*1)

--
Don Guillett
SalesAid Software

"Baha" wrote in message
...
hi All,
How to import a data from a excel workbook without opening the book.
lets say book name "mybook" location is:"C:\Documents and
Settings\BahadiAkcan\My Documents"
using above file can I make a match or vlookup function in a code?
thanks for your help

--
Regards,
Baha




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default import data without openning excel workbook

Technically, that is putting a formula in a cell and letting the Excel
linking mechanism retrieve the data, not getting it from VBA as you
specified.

--
Regards,
Tom Ogilvy

"Baha" wrote in message
...
hi,
i think I get my answer from other site. Thank you any way.Any one
intrested
this
question;here is the link that u can get the answer
http://www.rondebruin.nl/copy7.htm

--
Regards,
Baha


"Baha" wrote:

Thank you for the tip,but i was trying to put in a VBA code
so far I tried this but couldn`t figure out the proper one
sub getTheData()
dim x as long
x = Application.WorksheetFunction.VLookup(D7, "C:\Documents and
Settings\BahadiAkcan\My Documents\Book1hhhfhfh.xls"
.Sheet1.Range("a1:d33"),
3, 0)
msgbox x
end sub

can you give me a hint please?

--
Regards,
Baha


"Don Guillett" wrote:

Here is the basic syntax. Adapt to your vlookup and modify to suit

=SUMPRODUCT(('C:\yourfolder\[yourfile.xls]yoursheet'!$E$7:$E$1000=1)*1)

--
Don Guillett
SalesAid Software

"Baha" wrote in message
...
hi All,
How to import a data from a excel workbook without opening the book.
lets say book name "mybook" location is:"C:\Documents and
Settings\BahadiAkcan\My Documents"
using above file can I make a match or vlookup function in a code?
thanks for your help

--
Regards,
Baha







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default import data without openning excel workbook

after I use that code, my problem actually didnt fixed much.As you mentioned
I cannot use a function for closed workbook,so that code put entire column
values(cos I have to select A:A),then now I wrote an other code to delete all
cells which have "0" values which works very slow.Can u suggest,anything else
to delete "0" value?
here is my code
Application.ScreenUpdating = False
Dim cdel
cdel = Application.WorksheetFunction.CountIf(Sheet1.Range ("a1:a30000"), "0")
Do Until cdel = 0
Cells.Find(What:="0", After:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.EntireRow.Delete Shift:=xlUp
cdel = cdel - 1
Loop
Application.ScreenUpdating = True
is it very ugly?:)
--
Regards,
Baha


"Tom Ogilvy" wrote:

Technically, that is putting a formula in a cell and letting the Excel
linking mechanism retrieve the data, not getting it from VBA as you
specified.

--
Regards,
Tom Ogilvy

"Baha" wrote in message
...
hi,
i think I get my answer from other site. Thank you any way.Any one
intrested
this
question;here is the link that u can get the answer
http://www.rondebruin.nl/copy7.htm

--
Regards,
Baha


"Baha" wrote:

Thank you for the tip,but i was trying to put in a VBA code
so far I tried this but couldn`t figure out the proper one
sub getTheData()
dim x as long
x = Application.WorksheetFunction.VLookup(D7, "C:\Documents and
Settings\BahadiAkcan\My Documents\Book1hhhfhfh.xls"
.Sheet1.Range("a1:d33"),
3, 0)
msgbox x
end sub

can you give me a hint please?

--
Regards,
Baha


"Don Guillett" wrote:

Here is the basic syntax. Adapt to your vlookup and modify to suit

=SUMPRODUCT(('C:\yourfolder\[yourfile.xls]yoursheet'!$E$7:$E$1000=1)*1)

--
Don Guillett
SalesAid Software

"Baha" wrote in message
...
hi All,
How to import a data from a excel workbook without opening the book.
lets say book name "mybook" location is:"C:\Documents and
Settings\BahadiAkcan\My Documents"
using above file can I make a match or vlookup function in a code?
thanks for your help

--
Regards,
Baha






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default import data without openning excel workbook

Thank you very much. That's the code I'm looking for.
This discussion group is wonderful! ...... save me a lot of time in
searching and sieving through informative material.
Cheers!

"Baha" wrote in message
...
hi,
i think I get my answer from other site. Thank you any way.Any one
intrested
this
question;here is the link that u can get the answer
http://www.rondebruin.nl/copy7.htm

--
Regards,
Baha


"Baha" wrote:

Thank you for the tip,but i was trying to put in a VBA code
so far I tried this but couldn`t figure out the proper one
sub getTheData()
dim x as long
x = Application.WorksheetFunction.VLookup(D7, "C:\Documents and
Settings\BahadiAkcan\My Documents\Book1hhhfhfh.xls"
.Sheet1.Range("a1:d33"),
3, 0)
msgbox x
end sub

can you give me a hint please?

--
Regards,
Baha


"Don Guillett" wrote:

Here is the basic syntax. Adapt to your vlookup and modify to suit

=SUMPRODUCT(('C:\yourfolder\[yourfile.xls]yoursheet'!$E$7:$E$1000=1)*1)

--
Don Guillett
SalesAid Software

"Baha" wrote in message
...
hi All,
How to import a data from a excel workbook without opening the book.
lets say book name "mybook" location is:"C:\Documents and
Settings\BahadiAkcan\My Documents"
using above file can I make a match or vlookup function in a code?
thanks for your help

--
Regards,
Baha






Reply
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
Excel 2007:Share Workbook with import live Data amit Excel Worksheet Functions 0 November 13th 09 10:32 AM
Import/Copy some data from one workbook to a similar workbook [email protected] Excel Programming 11 March 7th 06 12:34 PM
i want to import data from one workbook to another and add a row wdaw924 Excel Worksheet Functions 0 January 16th 06 03:28 PM
How do I import data from 1 workbook excel sheet into another? LJHolland New Users to Excel 1 June 2nd 05 02:59 PM
Import Excel Data from another workbook or file tamato43 Excel Discussion (Misc queries) 1 February 28th 05 05:26 PM


All times are GMT +1. The time now is 01:49 AM.

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"