NAZ2008

New Member
Joined
May 22, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
  2. Web
Hello,

I am new to Excel and my brain is fried from trying to search the forum for similar questions/answers.

I am trying to populate a column with data based on information from 2 other columns.

In the attached worksheet, I want to populate column E with the names of the clients based on data from Column D and it would be referenced from any of the 1st 3 columns.

I tried this formula =IF(ISNUMBER(SEARCH($D$2:$D$21588,C3:C21589)),C3:C21588,"") but got the #SPILL error





Client IDClient NameMergedClient IDClient Name
ABC12345Client 1ABC12345Client 1ABC12345Client 1
ABC12345Client 1ABC12345Client 1ABC12345Client 1
ABC12345Client 1ABC12345Client 1ABC12345Client 1
DEF12345Client 2DEF12345Client 2ABC12345Client 1
DEF12345Client 2DEF12345Client 2ABC12345Client 1
ABD78945Client 3ABD78945Client 3ABC12345Client 1
ABD78945Client 3ABD78945Client 3DEF12345
ABD78945Client 3ABD78945Client 3DEF12345
ABD78945Client 3ABD78945Client 3DEF12345
ABD78945Client 3ABD78945Client 3ABD78945
ABD78945Client 3ABD78945Client 3ABD78945
ABD78945Client 3ABD78945Client 3ABD78945
ABD78945Client 3ABD78945Client 3ABD78945
ABD78945Client 3ABD78945Client 3ABD78945
DEG78945Client 4DEG78945Client 4ABD78945
DEG78945Client 4DEG78945Client 4ABD78945
DEG78945Client 4DEG78945Client 4ABD78945
DEG78945Client 4DEG78945Client 4ABD78945
DEG78945Client 4DEG78945Client 4
DEG78945Client 4DEG78945Client 4
DEG78945Client 4DEG78945Client 4


Any help & guidance would be greatly appreciated.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
The #SPILL error means you're not giving the formula enough cell real estate to output a dynamic range of cells. Try this.
]
Book1
ABCDE
1Client IDClient NameMergedClient IDClient Name
2ABC12345Client 1ABC12345Client 1ABC12345Client 1
3ABC12345Client 1ABC12345Client 1ABC12345Client 1
4ABC12345Client 1ABC12345Client 1ABC12345Client 1
5DEF12345Client 2DEF12345Client 2ABC12345Client 1
6DEF12345Client 2DEF12345Client 2ABC12345Client 1
7ABD78945Client 3ABD78945Client 3ABC12345Client 1
8ABD78945Client 3ABD78945Client 3DEF12345Client 2
9ABD78945Client 3ABD78945Client 3DEF12345Client 2
10ABD78945Client 3ABD78945Client 3DEF12345Client 2
11ABD78945Client 3ABD78945Client 3ABD78945Client 3
12ABD78945Client 3ABD78945Client 3ABD78945Client 3
13ABD78945Client 3ABD78945Client 3ABD78945Client 3
14ABD78945Client 3ABD78945Client 3ABD78945Client 3
15ABD78945Client 3ABD78945Client 3ABD78945Client 3
16DEG78945Client 4DEG78945Client 4ABD78945Client 3
17DEG78945Client 4DEG78945Client 4ABD78945Client 3
18DEG78945Client 4DEG78945Client 4ABD78945Client 3
19DEG78945Client 4DEG78945Client 4ABD78945Client 3
20DEG78945Client 4DEG78945Client 4not found
21DEG78945Client 4DEG78945Client 4not found
22DEG78945Client 4DEG78945Client 4not found
Sheet11
Cell Formulas
RangeFormula
E2:E22E2=XLOOKUP(D2,$A$2:$A$22,$B$2:$B$22,"not found")
 
Upvote 0
Solution
Thank you so much for your help on this. I thought if I included more rows than I needed would do the trick.

For my own curiosity, was the original formula kind of on the right track if I had done it correctly? And by cell real estate, is the more rows or columns or the width of the column only?
 
Upvote 0
Your initial formula is about half correct. You're getting a spill error because, for each row, you're returning all the results searched in C. So the results overlap (see columns E and F below). A few additional steps are needed to return only 1 cell instead of a whole range.
Book3
ABCDEFG
1Client IDClient NameMergedClient IDRow 2 Result onlyRow 3 Result onlyWith FILTER()
2ABC12345Client 1ABC12345Client 1ABC12345ABC12345ABC12345Client 1
3ABC12345Client 1ABC12345Client 1ABC12345ABC12345ABC12345ABC12345Client 1
4ABC12345Client 1ABC12345Client 1ABC12345ABC12345ABC12345ABC12345Client 1
5DEF12345Client 2DEF12345Client 2ABC12345ABC12345ABC12345Client 1
6DEF12345Client 2DEF12345Client 2ABC12345ABC12345Client 1
7ABD78945Client 3ABD78945Client 3ABC12345ABC12345Client 1
8ABD78945Client 3ABD78945Client 3DEF12345DEF12345Client 2
9ABD78945Client 3ABD78945Client 3DEF12345DEF12345Client 2
10ABD78945Client 3ABD78945Client 3DEF12345DEF12345Client 2
11ABD78945Client 3ABD78945Client 3ABD78945ABD78945Client 3
12ABD78945Client 3ABD78945Client 3ABD78945ABD78945Client 3
13ABD78945Client 3ABD78945Client 3ABD78945ABD78945Client 3
14ABD78945Client 3ABD78945Client 3ABD78945ABD78945Client 3
15ABD78945Client 3ABD78945Client 3ABD78945ABD78945Client 3
16DEG78945Client 4DEG78945Client 4ABD78945ABD78945Client 3
17DEG78945Client 4DEG78945Client 4ABD78945ABD78945Client 3
18DEG78945Client 4DEG78945Client 4ABD78945ABD78945Client 3
19DEG78945Client 4DEG78945Client 4ABD78945ABD78945Client 3
Sheet7
Cell Formulas
RangeFormula
E2:E19E2=IF(ISNUMBER(SEARCH(D2,$C$2:$C$19)),D2,"")
F3:F20F3=IF(ISNUMBER(SEARCH(D2,$C$2:$C$19)),D2,"")
G2:G19G2=UNIQUE(FILTER($C$2:$C$19,ISNUMBER(SEARCH(D2,$C$2:$C$19))))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,221,497
Messages
6,160,151
Members
451,625
Latest member
sukhman

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