ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Spacing problems (https://www.excelbanter.com/excel-worksheet-functions/133500-spacing-problems.html)

Heine

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


Mike

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



Heine

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


Mike

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



Heine

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




vezerid

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


Dave Peterson

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

Heine

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



All times are GMT +1. The time now is 07:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com