#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 49
Default Spacing problems

Hello everybody,

I am importing a phonelist via a web query. my phone numbers look like
this when imported:

11 22 33 44

I want to remove the spaces and only return the last four digits - how
is this done most easily?

Is it possible to Vlookup in a web query qithout problems?

Thanks in advance.

Regards
Heine

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Spacing problems

With number in A1 try

=RIGHT(TRIM(SUBSTITUTE(A1,CHAR(32),"")),4)

Mike

"Heine" wrote:

Hello everybody,

I am importing a phonelist via a web query. my phone numbers look like
this when imported:

11 22 33 44

I want to remove the spaces and only return the last four digits - how
is this done most easily?

Is it possible to Vlookup in a web query qithout problems?

Thanks in advance.

Regards
Heine


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 49
Default Spacing problems

On 6 Mar., 11:11, Mike wrote:
With number in A1 try

=RIGHT(TRIM(SUBSTITUTE(A1,CHAR(32),"")),4)

Mike



"Heine" wrote:
Hello everybody,


I am importing a phonelist via a web query. my phone numbers look like
this when imported:


11 22 33 44


I want to remove the spaces and only return the last four digits - how
is this done most easily?


Is it possible to Vlookup in a web query qithout problems?


Thanks in advance.


Regards
Heine- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -


Thanks Mike - that works great. Now I want to lookup in my query. Why
does it return #N/A? If I copy and insert values it does work. But
then I do not get the automation.... Hope somebody can help solve
this.

Regards
Heine

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Spacing problems

Heine,

Please post you lookup formula and an example of how your data are laid out.

Mike

"Heine" wrote:

On 6 Mar., 11:11, Mike wrote:
With number in A1 try

=RIGHT(TRIM(SUBSTITUTE(A1,CHAR(32),"")),4)

Mike



"Heine" wrote:
Hello everybody,


I am importing a phonelist via a web query. my phone numbers look like
this when imported:


11 22 33 44


I want to remove the spaces and only return the last four digits - how
is this done most easily?


Is it possible to Vlookup in a web query qithout problems?


Thanks in advance.


Regards
Heine- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -


Thanks Mike - that works great. Now I want to lookup in my query. Why
does it return #N/A? If I copy and insert values it does work. But
then I do not get the automation.... Hope somebody can help solve
this.

Regards
Heine


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 49
Default Spacing problems

On 6 Mar., 12:26, Mike wrote:
Heine,

Please post you lookup formula and an example of how your data are laid out.

Mike



"Heine" wrote:
On 6 Mar., 11:11, Mike wrote:
With number in A1 try


=RIGHT(TRIM(SUBSTITUTE(A1,CHAR(32),"")),4)


Mike


"Heine" wrote:
Hello everybody,


I am importing a phonelist via a web query. my phone numbers look like
this when imported:


11 22 33 44


I want to remove the spaces and only return the last four digits - how
is this done most easily?


Is it possible to Vlookup in a web query qithout problems?


Thanks in advance.


Regards
Heine- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -


Thanks Mike - that works great. Now I want to lookup in my query. Why
does it return #N/A? If I copy and insert values it does work. But
then I do not get the automation.... Hope somebody can help solve
this.


Regards
Heine- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -


Hi Mike

=VLOOKUP(B2;3;Sheet1!$J$3:$L$135;FALSE)

It is a straightforward lookup. But the lookup area is a web query.
Moreover I have added a column to the lookup area where I have
calculations (the above right formula). It returns #N/A. I have also
tried to use a named area - still returns #N/A. any thoughts?

Best regards
Heine





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Spacing problems

On Mar 6, 3:13 pm, "Heine" wrote:
On 6 Mar., 12:26, Mike wrote:



Heine,


Please post you lookup formula and an example of how your data are laid out.


Mike


"Heine" wrote:
On 6 Mar., 11:11, Mike wrote:
With number in A1 try


=RIGHT(TRIM(SUBSTITUTE(A1,CHAR(32),"")),4)


Mike


"Heine" wrote:
Hello everybody,


I am importing a phonelist via a web query. my phone numbers look like
this when imported:


11 22 33 44


I want to remove the spaces and only return the last four digits - how
is this done most easily?


Is it possible to Vlookup in a web query qithout problems?


Thanks in advance.


Regards
Heine- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -


Thanks Mike - that works great. Now I want to lookup in my query. Why
does it return #N/A? If I copy and insert values it does work. But
then I do not get the automation.... Hope somebody can help solve
this.


Regards
Heine- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -


Hi Mike

=VLOOKUP(B2;3;Sheet1!$J$3:$L$135;FALSE)

It is a straightforward lookup. But the lookup area is a web query.
Moreover I have added a column to the lookup area where I have
calculations (the above right formula). It returns #N/A. I have also
tried to use a named area - still returns #N/A. any thoughts?

Best regards
Heine


The arguments are in the wrong order:

=VLOOKUP(B2;Sheet1!$J$3:$L$135;3;FALSE)

Also, what values do you now have in J3:J135? Your original phones or
the result of applyiung Mike's formula?

HTH
Kostis Vezerides

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Spacing problems

If you want to match up using numbers--not text that looks like numbers, try
this:

=--RIGHT(TRIM(SUBSTITUTE(A1,CHAR(32),"")),4)
or
=--RIGHT(TRIM(SUBSTITUTE(A1," ","")),4)

the -- stuff changes text numbers to number numbers.

And to excel:
'1234 (treated as text) isn't the same as 1234 (a real number).


Heine wrote:

On 6 Mar., 12:26, Mike wrote:
Heine,

Please post you lookup formula and an example of how your data are laid out.

Mike



"Heine" wrote:
On 6 Mar., 11:11, Mike wrote:
With number in A1 try


=RIGHT(TRIM(SUBSTITUTE(A1,CHAR(32),"")),4)


Mike


"Heine" wrote:
Hello everybody,


I am importing a phonelist via a web query. my phone numbers look like
this when imported:


11 22 33 44


I want to remove the spaces and only return the last four digits - how
is this done most easily?


Is it possible to Vlookup in a web query qithout problems?


Thanks in advance.


Regards
Heine- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -


Thanks Mike - that works great. Now I want to lookup in my query. Why
does it return #N/A? If I copy and insert values it does work. But
then I do not get the automation.... Hope somebody can help solve
this.


Regards
Heine- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -


Hi Mike

=VLOOKUP(B2;3;Sheet1!$J$3:$L$135;FALSE)

It is a straightforward lookup. But the lookup area is a web query.
Moreover I have added a column to the lookup area where I have
calculations (the above right formula). It returns #N/A. I have also
tried to use a named area - still returns #N/A. any thoughts?

Best regards
Heine


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 49
Default Spacing problems

On 6 Mar., 14:36, Dave Peterson wrote:
If you want to match up using numbers--not text that looks like numbers, try
this:

=--RIGHT(TRIM(SUBSTITUTE(A1,CHAR(32),"")),4)
or
=--RIGHT(TRIM(SUBSTITUTE(A1," ","")),4)

the -- stuff changes text numbers to number numbers.

And to excel:
'1234 (treated as text) isn't the same as 1234 (a real number).





Heine wrote:

On 6 Mar., 12:26, Mike wrote:
Heine,


Please post you lookup formula and an example of how your data are laid out.


Mike


"Heine" wrote:
On 6 Mar., 11:11, Mike wrote:
With number in A1 try


=RIGHT(TRIM(SUBSTITUTE(A1,CHAR(32),"")),4)


Mike


"Heine" wrote:
Hello everybody,


I am importing a phonelist via a web query. my phone numbers look like
this when imported:


11 22 33 44


I want to remove the spaces and only return the last four digits - how
is this done most easily?


Is it possible to Vlookup in a web query qithout problems?


Thanks in advance.


Regards
Heine- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -


Thanks Mike - that works great. Now I want to lookup in my query. Why
does it return #N/A? If I copy and insert values it does work. But
then I do not get the automation.... Hope somebody can help solve
this.


Regards
Heine- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -


Hi Mike


=VLOOKUP(B2;3;Sheet1!$J$3:$L$135;FALSE)


It is a straightforward lookup. But the lookup area is a web query.
Moreover I have added a column to the lookup area where I have
calculations (the above right formula). It returns #N/A. I have also
tried to use a named area - still returns #N/A. any thoughts?


Best regards
Heine


--

Dave Peterson- Skjul tekst i anførselstegn -

- Vis tekst i anførselstegn -


Thanks Dave - that worked great - and really easy.

Best regards
Heine

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
CELL SPACING scsobgyn Excel Discussion (Misc queries) 1 September 13th 06 05:24 PM
Double spacing axissm Excel Discussion (Misc queries) 2 February 19th 06 11:45 PM
Legend Line Spacing Bill Sturdevant Charts and Charting in Excel 1 July 6th 05 12:35 PM
Common spacing RAJEEV CHADHA Excel Worksheet Functions 0 April 26th 05 01:29 PM
SPACING RAJEEV CHADHA Excel Worksheet Functions 5 April 18th 05 02:11 PM


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