Concating cells in range if condition exists

JimS63

New Member
Joined
Dec 8, 2020
Messages
21
Office Version
  1. 365
Platform
  1. Windows
I have a range of cells, some merged that contain customer information. If the customer is attending or has a video demo I want a single cell that shows all the customers involved.

My cells look like the picture attached.
Calendar Input.png


I want the last column to show all the customers to the left that have customer or video on the last line.

I have tried to put this code into a function in VBA
VBA Code:
IF(ISNUMBER(SEARCH("abc",A1:L5)),A1:L5,"")
to see if the cell contains the text and then
VBA Code:
 LEFT(T11,FIND("*",T11,2)-1)
to return the customer name.

I keep getting errors and haven't been able to figure this out.

Can anyone help me with a function module that I could use on a second sheet to create a list of customer blocks

Thanks
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
So I am using this code now and can get a range of cells to the right that give me the output I want. However I would like to concat all the cells into one cell with CHR(10) between names
Excel Formula:
= IF(ISNUMBER(SEARCH("Customer",O14:AG14)),LEFT(O14:AG14,FIND("*",O14:AG14,2)-1),"")

Any help there?
 
Upvote 0

Forum statistics

Threads
1,214,665
Messages
6,120,804
Members
448,990
Latest member
rohitsomani

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