List: If something begins with a character, then the result is this

mduntley

Board Regular
Joined
May 23, 2015
Messages
139
Office Version
  1. 365
Platform
  1. Windows
Here is a example of a project that I am doing

If the List has a cell that start with B, then add a column with the text of "Color is good"

Power Query:
= #table({"Town", "Color"}, {{"New York",{"Red","Orange","Green"}},{"Boston",{"Yellow","Blue","Green"}}})[/CODE

TownColorColumn1
New YorkList
BostonListColor is good
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Power Query:
let
    Source = #table({"Town", "Color"}, {{"New York",{"Red","Orange","Green"}},{"Boston",{"Yellow","Blue","Green"}}}),
    Result = Table.AddColumn(Source, "Column1", each if List.Count(List.Select([Color], each Text.Start(_,1)="B"))>0 then "Color is good" else "")
in
    Result
 
Upvote 0
Solution

Forum statistics

Threads
1,223,375
Messages
6,171,738
Members
452,419
Latest member
mapa

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