An effective way to write the formula

shlomi2020

New Member
Joined
Jan 17, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello,

I'm looking for a more effective way for the formula that i wrote :

=IF(B2= "","No Value",IF(ISNUMBER(SEARCH("*Simon Buskilla*",B2)),VLOOKUP("*Simon Buskilla*",$F$1:$G$4,2,0),IF(ISNUMBER(SEARCH("*Sapir Zur*",B2)),VLOOKUP("*Sapir Zur*",$F$1:$G$4,2,0),IF(ISNUMBER(SEARCH("*Shlomi Ohana*",B2)),VLOOKUP("*Shlomi Ohana*",$F$1:$G$4,2,0)))))

See the attached image.

Picture2.PNG


Now I manually enter the names into the formula, I would like it to be automatic and I will only need to maintain the table = "worker name, Department".

I could only use a Vlookup but I used the formula because when appearing in the cell more than one name, Vlookup not working properly as in the "Business Names" column.

I would appreciate the help, Thanks.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Cross posted Effective way to write the formula

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
If you have Office 365 or Excel 2019 then you can use TEXTJOIN function like below.

=TEXTJOIN(",",TRUE,IF($G$2:$G$4=A2,$F$2:$F$4,""))
 
Upvote 0
If I've understood what your trying to achieve an easier way, perhaps, would be to use a pivottable. Ensure your data has column headings, create a pivot table and put both the Department and Worker Name as row entries. Set the layout of the Pivottable to Tabular, turn off grand totals and sub totals.
 
Upvote 0

Forum statistics

Threads
1,214,390
Messages
6,119,235
Members
448,879
Latest member
VanGirl

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