Concatenate and IF function but with multiple conditions / criteria

tasic89

New Member
Joined
Apr 12, 2021
Messages
35
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
Hi,

I need help with making a IF formula or something else.

I would like to have b2 and d2 cells as drop down lists. B2 is name, D2 is surname. If I choose those "fixed values" from drop down lists in those fields, i want them to concatenate like "name" " " (empty space) and "surname".

But:

If I have some name OR surname that isn't in drop down list (like anne marie, or maria magdalena, or jonhson watson...) I would like to insert them manually in B8 or D8...

Now I want that IF function check if B8 or D8 are empty, and if they are, than to concatenate "b2+d2", if they have some value, than "b8+d8.

Excel Formula:
=IF(OR(B8=""; D8="");CONCATENATE(B2;" ";D2);CONCATENATE(B8;" ";D8))

This is something I can do,,, but is there a chance for some multiple criteria ?

My goal is that formula checks if "b8 is empty BUT d8 isn't, than concatenate b2+d8"... if "d8 is empty but b8 isn't, than concatenate b8+d2, and than "if b8 and d8 are empty, than concatenate b2+d2.

I hope it isn't too confusing.

Book1
ABCDEFGHIJ
1
2peterdavidson
3
4
5peter davidson
6
7
8
9
10
11
12
13
Sheet1
Cell Formulas
RangeFormula
G5G5=IF(OR(B8="", D8=""),CONCATENATE(B2," ",D2),CONCATENATE(B8," ",D8))
Cells with Data Validation
CellAllowCriteria
B2Listmichael; peter; johannes
D2Listjohnson; davidson; watson
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
How about
Excel Formula:
=IF(B8="",B2,B8)&" "&IF(D8="",D2,D8)
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,492
Members
448,967
Latest member
visheshkotha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top