Skip to forum
Notifications
Clear all

Excelfrage

6 Posts
4 Users
0 Reactions
1,532 Views
Hotsauce112
Joined: 22.11.2007

Hi,
ich habe folgendes Problem:


Ich möchte das Excel die gefüllte Zelle aus Spalte A&B in einer weiteren Zelle einträgt.
Das mach ich mit: =(A2&" "&B2)

Wenn jedoch beide Spalten gefüllt sind möchte ich mir nur den Wert Aus Spalte B ausgeben lassen.

Weiß jemand wie das geht?

Optional: Wenn keine Spalte gefüllt ist einen bestimmten Text ausgeben


Reply
Quote
5 replies
Harrier88
Joined: 01.05.2012

Hi Hotsauce,

this is the English forum, but try:

=IF(ISBLANK(A2); (A2&" "&B2); B2)

If you would also like to display a certain text if both cells are empty, try:

=IF(ISBLANK(A2); IF(ISBLANK(B2); "insert text"; (A2&" "&B2)); B2)

Replace "insert text" with anything you like, but keep the quotation marks. If, for example, you would like it to say empty, then try:

=IF(ISBLANK(A2); IF(ISBLANK(B2); "empty"; (A2&" "&B2)); B2)

I tried this in OpenOffice, and it seems to work.


Reply
Quote
Super Moderator
VorpalF2F
Joined: 02.09.2010

Hi Hotsauce112
If you wish there is also the German forum?
Also, I fixed the image in your post so it is visible.
If you edit your post, you'll see what the difference is.
In short, you need to copy the image URL, not the page URL

You are quite welcome to post in the English forum, but please post in English.
If necessary, you can translate to English using Google Translate before posting.

The Excel syntax is a little different -- replace the semicolons with commas and it will more-or-less work, but you may need to adapt it a bit.


Reply
Quote
Hotsauce112
Joined: 22.11.2007

Almost.
Is B empty and A not, then i get a 0 instead of whats in A


Reply
Quote
Super Moderator
VorpalF2F
Joined: 02.09.2010

Try this:
=IF(ISBLANK(A5),IF(ISBLANK(B5),"Both are Blank","A is blank but B isn't"),IF(ISBLANK(B5),"A is not blank, but B is","Neither is Blank"))
Just change the text descriptions to what you want.


Reply
Quote
Rhodriguez
Joined: 01.10.2006

Originally posted by VorpalF2F
The Excel syntax is a little different -- replace the semicolons with commas and it will more-or-less work, but you may need to adapt it a bit.

Minor correction. Comma and semicolon has nothing to do with the software that is used but with the local settings.

you could also use the AND and NOT operator

=IF(AND(A1<>"";B1 <>"");B1;A1&" "&B1)

Depending what your actual goal is and me not quite understanding the reasoning of the trailing or ending empty spaces as A1&B1 just works fine. Maybe instead of just B1 you also whant to have a look at ""&B1 if you're using numbers in the cells and want all aligned on the same side without formatting.


Reply
Quote