#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default Spaces

Hi
Anyone can help
I have this problem in this formula
A B C D
1 Olives Chili Cumin
2 12 19 15
=IF(A2<20;$A$1;"")&IF(B2<20;$B$1;"")&IF(C2<20;$C$1 ;"")
What I get is Oiveschilicumin without spaces in between, how to have
the spaces in this formula
Thanks in advance
Jam

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

Hi Jam,

=IF(A2<20;$A$1;"")&" "&IF(B2<20;$B$1;"")&" "&IF(C2<20;$C$1;"")

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


wrote in message oups.com...
| Hi
| Anyone can help
| I have this problem in this formula
| A B C D
| 1 Olives Chili Cumin
| 2 12 19 15
| =IF(A2<20;$A$1;"")&IF(B2<20;$B$1;"")&IF(C2<20;$C$1 ;"")
| What I get is Oiveschilicumin without spaces in between, how to have
| the spaces in this formula
| Thanks in advance
| Jam
|


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 620
Default Spaces

=IF(A2<20;$A$1;"")&" "&IF(B2<20;$B$1;"")&" "&IF(C2<20;$C$1;"")
--
David Biddulph

wrote in message
oups.com...
Hi
Anyone can help
I have this problem in this formula
A B C D
1 Olives Chili Cumin
2 12 19 15
=IF(A2<20;$A$1;"")&IF(B2<20;$B$1;"")&IF(C2<20;$C$1 ;"")
What I get is Oiveschilicumin without spaces in between, how to have
the spaces in this formula
Thanks in advance
Jam



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 694
Default Spaces

Just a little point you may want to run trim over it afterwards to remove
duplicate spaces for example:

=trim(IF(A2<20;$A$1;"")&" "&IF(B2<20;$B$1;"")&" "&IF(C2<20;$C$1;""))

if B2=20

you get

Olives _ _ Cumin

and therefore the trim will remove duplicate spaces as give you

Olives _ Cumin

--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Niek Otten" wrote:

Hi Jam,

=IF(A2<20;$A$1;"")&" "&IF(B2<20;$B$1;"")&" "&IF(C2<20;$C$1;"")

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


wrote in message oups.com...
| Hi
| Anyone can help
| I have this problem in this formula
| A B C D
| 1 Olives Chili Cumin
| 2 12 19 15
| =IF(A2<20;$A$1;"")&IF(B2<20;$B$1;"")&IF(C2<20;$C$1 ;"")
| What I get is Oiveschilicumin without spaces in between, how to have
| the spaces in this formula
| Thanks in advance
| Jam
|



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Spaces

Niek Otten, Martin Fishlock, and David Biddulph all use
"")&" "& (why???)

you could use this instead
" ")&

To eliminate many spaces as the result . The header should have a space in
front
than OP could use the original formula.

" wrote:

Hi
Anyone can help
I have this problem in this formula
A B C D
1 Olives Chili Cumin
2 12 19 15
=IF(A2<20;$A$1;"")&IF(B2<20;$B$1;"")&IF(C2<20;$C$1 ;"")
What I get is Oiveschilicumin without spaces in between, how to have
the spaces in this formula
Thanks in advance
Jam


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 620
Default Spaces

Because in your formula you are putting a space in place of the empty string
when the row 2 value is =20, but what the OP was asking for was a space
between his $A$1,$B$1, and $C$1 results when the row 2 value is <20.
As you say, if row 1 includes either leading or trailing spaces, then the
change isn't needed, but text strings with leading or particularly trailing
spaces often cause confusion elsewhere.
--
David Biddulph

"Teethless mama" wrote in message
...
Niek Otten, Martin Fishlock, and David Biddulph all use
"")&" "& (why???)

you could use this instead
" ")&

To eliminate many spaces as the result . The header should have a space in
front
than OP could use the original formula.

" wrote:

Hi
Anyone can help
I have this problem in this formula
A B C D
1 Olives Chili Cumin
2 12 19 15
=IF(A2<20;$A$1;"")&IF(B2<20;$B$1;"")&IF(C2<20;$C$1 ;"")
What I get is Oiveschilicumin without spaces in between, how to have
the spaces in this formula
Thanks in advance
Jam




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
Remove trailing spaces from multiple columns in Excel dcaissie Excel Worksheet Functions 8 May 16th 08 08:21 PM
Spaces in cells Brian Excel Worksheet Functions 1 August 2nd 06 06:17 AM
How keep Leading/Trailing spaces when save in Excel? jorgejulio Excel Discussion (Misc queries) 0 August 1st 06 09:49 PM
spaces not recognized as spaces windsurferLA Excel Worksheet Functions 9 July 27th 06 11:49 AM
Stripping out imbedded spaces in a cell/row Tom Excel Worksheet Functions 8 April 22nd 05 03:49 PM


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