Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How to make Join in VisualBasic

Hello,
I have two sheets in excel that I want to join them by name.
is there any command that can I use like the join command in SQL ?
The first sheet contains the following data:
Name, Telephone, ID
The Second Sheet contain:
Name, Shift, Team.
each name appear only one time in each sheet or it may not appear in
the second sheet.

in SQL, the syntax is:
Select Name, Telephone, Shift
From Sheet1, Sheet2

Where Sheet1.name = Sheet2.name

How do I do that in visual Basic in Excel ?
Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default How to make Join in VisualBasic

SQL is actually quite easy in Excel.
Look at this posting:

http://makeashorterlink.com/?H5D925A0E

RBS

"Tony" wrote in message
oups.com...
Hello,
I have two sheets in excel that I want to join them by name.
is there any command that can I use like the join command in SQL ?
The first sheet contains the following data:
Name, Telephone, ID
The Second Sheet contain:
Name, Shift, Team.
each name appear only one time in each sheet or it may not appear in
the second sheet.

in SQL, the syntax is:
Select Name, Telephone, Shift
From Sheet1, Sheet2

Where Sheet1.name = Sheet2.name

How do I do that in visual Basic in Excel ?
Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default How to make Join in VisualBasic

Just out of curiosity, I have to ask something: When I see posts like
this, that want to go very deep into SQL, why is the project in EXCEL
at all? Shouldn't it be in Access?

Anyone?
Dom

Tony wrote:
Hello,
I have two sheets in excel that I want to join them by name.
is there any command that can I use like the join command in SQL ?
The first sheet contains the following data:
Name, Telephone, ID
The Second Sheet contain:
Name, Shift, Team.
each name appear only one time in each sheet or it may not appear in
the second sheet.

in SQL, the syntax is:
Select Name, Telephone, Shift
From Sheet1, Sheet2

Where Sheet1.name = Sheet2.name

How do I do that in visual Basic in Excel ?
Thanks.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default How to make Join in VisualBasic

Because Excel has a better (decent!) development environment, and you can
then use Excel functionality on the retrieved data. And plus, some sites
don't have Access.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
oups.com...
Just out of curiosity, I have to ask something: When I see posts like
this, that want to go very deep into SQL, why is the project in EXCEL
at all? Shouldn't it be in Access?

Anyone?
Dom

Tony wrote:
Hello,
I have two sheets in excel that I want to join them by name.
is there any command that can I use like the join command in SQL ?
The first sheet contains the following data:
Name, Telephone, ID
The Second Sheet contain:
Name, Shift, Team.
each name appear only one time in each sheet or it may not appear in
the second sheet.

in SQL, the syntax is:
Select Name, Telephone, Shift
From Sheet1, Sheet2

Where Sheet1.name = Sheet2.name

How do I do that in visual Basic in Excel ?
Thanks.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How to make Join in VisualBasic

Hello,
I'm sorry that it took so long to answer...
first, Thanks for the help.
I'm getting a compiling problem when I run the macro that appears in
the link that you gave.
The error occours in the following line:
Dim rs As ADODB.Recordset

notice that I don't have Microsoft Access installed in the computer...



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default How to make Join in VisualBasic

You need to set a reference to the ActiveX Data Objects Library.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Tony" wrote in message
ups.com...
Hello,
I'm sorry that it took so long to answer...
first, Thanks for the help.
I'm getting a compiling problem when I run the macro that appears in
the link that you gave.
The error occours in the following line:
Dim rs As ADODB.Recordset

notice that I don't have Microsoft Access installed in the computer...



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
Join tables like inner join in Access ryanp Excel Discussion (Misc queries) 2 July 18th 08 03:35 PM
How do I join text from 2 cells, and make them appear in 2 lines becerra Excel Discussion (Misc queries) 1 July 24th 07 04:30 PM
aaaaaaaaaaargh Help! Convert UDF to Visualbasic aazar Excel Programming 2 December 29th 04 12:14 PM
Excel Visualbasic Jeff[_24_] Excel Programming 2 November 3rd 03 12:40 PM


All times are GMT +1. The time now is 11:37 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"