Looking for a Formula to pull results from a column based on another column

ftroxell

New Member
Joined
Jul 14, 2023
Messages
4
Office Version
  1. 365
Platform
  1. MacOS
I am trying to figure out a formula that will look at one column and return a value from a different column based on wether or not the first column is blank.

Here in my example;

I would like to build a list of names that have a number associated with them. Look in Column B and return the value in Column A if there is a number to the result and concatenate them together.

Column AColumn BResult
Tom
2.5​
Tom, Chris, Olivia, Jan, Todd
John
Chris
5​
Olivia
6​
Jan
4​
Sherry
Todd
7.5​
Victor

Thanks for your assistance.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi & welcome to MrExcel.
How about
Excel Formula:
=textjoin(", ",,filter(a2:a100,b2:b100<>""))
 
Upvote 0
Solution
Hi & welcome to MrExcel.
How about
Excel Formula:
=textjoin(", ",,filter(a2:a100,b2:b100<>""))
One follow up question if you don't mind. If Column B has nothing in it, how can I not give a "#CALC' error?
 
Upvote 0
Try
Excel Formula:
=textjoin(", ",,filter(a2:a100,b2:b100<>"",""))
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,443
Messages
6,124,890
Members
449,194
Latest member
JayEggleton

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