Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Copy Data from External Spreadsheet

Here's my situation:
What I need to do is create a simple formula that automatically grabs the
data from a spreadsheet ('Phone Exts.xls' - 'Sheet1') and put it in the
correct rows in another spreadsheet. The trouble is that the Phone Exts.xls
sheet has one column devoted to apartments formatted as so: 1001A; but, the
other sheet has two columns devoted to the apartment number, and bedroom
letter. So the sheets would look like:
Phone Exts.xls
Apt# | Ext
1001A | 26001
1001B | 26002

Other Sheet.xls
Apt# | Rm | Ext
1001 | A |
1001 | B |

So I thought I would create a simple formula to be run on each row in the
Ext column of 'Other Sheet.xls'. That's where I have trouble. How could I
do this? Is it even possible? Any help would be greatly appreciated. And
for the record, I am still googleing on how to do this, and I have searched
this community before posting.

~Brett
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default Copy Data from External Spreadsheet

You can use something like this:

dim txt as String
txt = "3123C"

Range("A1") = Left(txt,Len(txt)-1)
Range("B1")=Right(txt,1)

set txt = to a variable and put the whole thing in a loop.

Or you can put the formulas into the worksheet with the proper
cell references in place of txt
--
steveB

Remove "AYN" from email to respond
"Brett Patterson" wrote in
message ...
Here's my situation:
What I need to do is create a simple formula that automatically grabs the
data from a spreadsheet ('Phone Exts.xls' - 'Sheet1') and put it in the
correct rows in another spreadsheet. The trouble is that the Phone
Exts.xls
sheet has one column devoted to apartments formatted as so: 1001A; but,
the
other sheet has two columns devoted to the apartment number, and bedroom
letter. So the sheets would look like:
Phone Exts.xls
Apt# | Ext
1001A | 26001
1001B | 26002

Other Sheet.xls
Apt# | Rm | Ext
1001 | A |
1001 | B |

So I thought I would create a simple formula to be run on each row in the
Ext column of 'Other Sheet.xls'. That's where I have trouble. How could
I
do this? Is it even possible? Any help would be greatly appreciated.
And
for the record, I am still googleing on how to do this, and I have
searched
this community before posting.

~Brett



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copy Data from External Spreadsheet

In C2 of the sheetin Other Sheet.xls put in the formula:

=vlookup(A2&B2,'[Phone Exts.xls]!Sheet1'$A$1:$B$500,2,False)

then drag fill down the column

--
Regards,
Tom Ogilvy


"Brett Patterson" wrote in
message ...
Here's my situation:
What I need to do is create a simple formula that automatically grabs the
data from a spreadsheet ('Phone Exts.xls' - 'Sheet1') and put it in the
correct rows in another spreadsheet. The trouble is that the Phone

Exts.xls
sheet has one column devoted to apartments formatted as so: 1001A; but,

the
other sheet has two columns devoted to the apartment number, and bedroom
letter. So the sheets would look like:
Phone Exts.xls
Apt# | Ext
1001A | 26001
1001B | 26002

Other Sheet.xls
Apt# | Rm | Ext
1001 | A |
1001 | B |

So I thought I would create a simple formula to be run on each row in the
Ext column of 'Other Sheet.xls'. That's where I have trouble. How could

I
do this? Is it even possible? Any help would be greatly appreciated.

And
for the record, I am still googleing on how to do this, and I have

searched
this community before posting.

~Brett



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Copy Data from External Spreadsheet

Thanks for the replies.

I think Tom's answer is more on the track of what I'm looking for. Mainly
because it is contained within the spreadsheet. I run into a problem when I
try to use it though. I get the error saying there's something wrong with
the formula and it selects the table_array value: '[Phone

I thought maybe it has to do with a space being in the title, but it
doesn't. Any other suggestions? I know it's the right track, but it's just
not working.

~Brett

"Tom Ogilvy" wrote:

In C2 of the sheetin Other Sheet.xls put in the formula:

=vlookup(A2&B2,'[Phone Exts.xls]!Sheet1'$A$1:$B$500,2,False)

then drag fill down the column

--
Regards,
Tom Ogilvy


"Brett Patterson" wrote in
message ...
Here's my situation:
What I need to do is create a simple formula that automatically grabs the
data from a spreadsheet ('Phone Exts.xls' - 'Sheet1') and put it in the
correct rows in another spreadsheet. The trouble is that the Phone

Exts.xls
sheet has one column devoted to apartments formatted as so: 1001A; but,

the
other sheet has two columns devoted to the apartment number, and bedroom
letter. So the sheets would look like:
Phone Exts.xls
Apt# | Ext
1001A | 26001
1001B | 26002

Other Sheet.xls
Apt# | Rm | Ext
1001 | A |
1001 | B |

So I thought I would create a simple formula to be run on each row in the
Ext column of 'Other Sheet.xls'. That's where I have trouble. How could

I
do this? Is it even possible? Any help would be greatly appreciated.

And
for the record, I am still googleing on how to do this, and I have

searched
this community before posting.

~Brett




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copy Data from External Spreadsheet

In d2 put in an = sign. Then navigate to Phone Exts.xls (in the menu, select
windows, then Phone Exts.xls) then go to the proper sheet and highlight the
data. Hit enter.

This will put in the proper reference to the sheet for you and you can copy
it into the formula I provided.

--
Regards ,
Tom Ogilvy


"Brett Patterson" wrote in
message ...
Thanks for the replies.

I think Tom's answer is more on the track of what I'm looking for. Mainly
because it is contained within the spreadsheet. I run into a problem when

I
try to use it though. I get the error saying there's something wrong with
the formula and it selects the table_array value: '[Phone

I thought maybe it has to do with a space being in the title, but it
doesn't. Any other suggestions? I know it's the right track, but it's

just
not working.

~Brett

"Tom Ogilvy" wrote:

In C2 of the sheetin Other Sheet.xls put in the formula:

=vlookup(A2&B2,'[Phone Exts.xls]!Sheet1'$A$1:$B$500,2,False)

then drag fill down the column

--
Regards,
Tom Ogilvy


"Brett Patterson" wrote in
message ...
Here's my situation:
What I need to do is create a simple formula that automatically grabs

the
data from a spreadsheet ('Phone Exts.xls' - 'Sheet1') and put it in

the
correct rows in another spreadsheet. The trouble is that the Phone

Exts.xls
sheet has one column devoted to apartments formatted as so: 1001A;

but,
the
other sheet has two columns devoted to the apartment number, and

bedroom
letter. So the sheets would look like:
Phone Exts.xls
Apt# | Ext
1001A | 26001
1001B | 26002

Other Sheet.xls
Apt# | Rm | Ext
1001 | A |
1001 | B |

So I thought I would create a simple formula to be run on each row in

the
Ext column of 'Other Sheet.xls'. That's where I have trouble. How

could
I
do this? Is it even possible? Any help would be greatly appreciated.

And
for the record, I am still googleing on how to do this, and I have

searched
this community before posting.

~Brett








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Copy Data from External Spreadsheet

Thanks for that. Still nothing yet. The formula I'm using is:

=vlookup(A2&B2,'[Phone EXTs.xls]Sheet1'!$A$2:$B$583,2,false)

I did as you instructed, and now, it doesn't do anything. It just gives me
the formula (not the output) or any errors when I hit enter.

~Brett

"Tom Ogilvy" wrote:

In d2 put in an = sign. Then navigate to Phone Exts.xls (in the menu, select
windows, then Phone Exts.xls) then go to the proper sheet and highlight the
data. Hit enter.

This will put in the proper reference to the sheet for you and you can copy
it into the formula I provided.

--
Regards ,
Tom Ogilvy


"Brett Patterson" wrote in
message ...
Thanks for the replies.

I think Tom's answer is more on the track of what I'm looking for. Mainly
because it is contained within the spreadsheet. I run into a problem when

I
try to use it though. I get the error saying there's something wrong with
the formula and it selects the table_array value: '[Phone

I thought maybe it has to do with a space being in the title, but it
doesn't. Any other suggestions? I know it's the right track, but it's

just
not working.

~Brett

"Tom Ogilvy" wrote:

In C2 of the sheetin Other Sheet.xls put in the formula:

=vlookup(A2&B2,'[Phone Exts.xls]!Sheet1'$A$1:$B$500,2,False)

then drag fill down the column

--
Regards,
Tom Ogilvy


"Brett Patterson" wrote in
message ...
Here's my situation:
What I need to do is create a simple formula that automatically grabs

the
data from a spreadsheet ('Phone Exts.xls' - 'Sheet1') and put it in

the
correct rows in another spreadsheet. The trouble is that the Phone
Exts.xls
sheet has one column devoted to apartments formatted as so: 1001A;

but,
the
other sheet has two columns devoted to the apartment number, and

bedroom
letter. So the sheets would look like:
Phone Exts.xls
Apt# | Ext
1001A | 26001
1001B | 26002

Other Sheet.xls
Apt# | Rm | Ext
1001 | A |
1001 | B |

So I thought I would create a simple formula to be run on each row in

the
Ext column of 'Other Sheet.xls'. That's where I have trouble. How

could
I
do this? Is it even possible? Any help would be greatly appreciated.
And
for the record, I am still googleing on how to do this, and I have
searched
this community before posting.

~Brett






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copy Data from External Spreadsheet

first, Go into Tools=Options=View and make sure that "formulas" is
unchecked.

then make sure the cell isn't formatted as Text.

If that is not the case, then

select the column and do

Edit=Replace

in both boxes put an equal sign.

Then click replace all (replace an equal sign with an equal sign). this
usually causes it to be evaluated as a formula

--
Regards,
Tom Ogilvy

"Brett Patterson" wrote in
message ...
Thanks for that. Still nothing yet. The formula I'm using is:

=vlookup(A2&B2,'[Phone EXTs.xls]Sheet1'!$A$2:$B$583,2,false)

I did as you instructed, and now, it doesn't do anything. It just gives

me
the formula (not the output) or any errors when I hit enter.

~Brett

"Tom Ogilvy" wrote:

In d2 put in an = sign. Then navigate to Phone Exts.xls (in the menu,

select
windows, then Phone Exts.xls) then go to the proper sheet and highlight

the
data. Hit enter.

This will put in the proper reference to the sheet for you and you can

copy
it into the formula I provided.

--
Regards ,
Tom Ogilvy


"Brett Patterson" wrote in
message ...
Thanks for the replies.

I think Tom's answer is more on the track of what I'm looking for.

Mainly
because it is contained within the spreadsheet. I run into a problem

when
I
try to use it though. I get the error saying there's something wrong

with
the formula and it selects the table_array value: '[Phone

I thought maybe it has to do with a space being in the title, but it
doesn't. Any other suggestions? I know it's the right track, but

it's
just
not working.

~Brett

"Tom Ogilvy" wrote:

In C2 of the sheetin Other Sheet.xls put in the formula:

=vlookup(A2&B2,'[Phone Exts.xls]!Sheet1'$A$1:$B$500,2,False)

then drag fill down the column

--
Regards,
Tom Ogilvy


"Brett Patterson" wrote

in
message ...
Here's my situation:
What I need to do is create a simple formula that automatically

grabs
the
data from a spreadsheet ('Phone Exts.xls' - 'Sheet1') and put it

in
the
correct rows in another spreadsheet. The trouble is that the

Phone
Exts.xls
sheet has one column devoted to apartments formatted as so: 1001A;

but,
the
other sheet has two columns devoted to the apartment number, and

bedroom
letter. So the sheets would look like:
Phone Exts.xls
Apt# | Ext
1001A | 26001
1001B | 26002

Other Sheet.xls
Apt# | Rm | Ext
1001 | A |
1001 | B |

So I thought I would create a simple formula to be run on each row

in
the
Ext column of 'Other Sheet.xls'. That's where I have trouble.

How
could
I
do this? Is it even possible? Any help would be greatly

appreciated.
And
for the record, I am still googleing on how to do this, and I have
searched
this community before posting.

~Brett








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
Click Button to Load External Data Into Spreadsheet simsjr Excel Programming 9 March 18th 09 10:31 PM
External Data Queries - Data Range Properties v Spreadsheet Format HLS Excel Discussion (Misc queries) 0 April 5th 06 11:09 AM
Using external data with differing formats in a spreadsheet ac512 Excel Discussion (Misc queries) 4 August 9th 05 06:19 AM
External SQL Data not updating in spreadsheet when loading in OWC Chris Tromans Excel Programming 0 May 18th 05 06:16 PM
Copy data from an external application into Excel Candide Excel Programming 3 July 14th 04 08:00 PM


All times are GMT +1. The time now is 11:42 AM.

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

About Us

"It's about Microsoft Excel"