Forum Discussion
If column has a word within it pull the name in another column
- Feb 20, 2024
The file you sent is my first suggestion where all data must be entered. Attached is the file with the changed M code which accepts rows without a city. I changed the name of the file from "If column has a word within it pull the name in another column" to "CHANGED If column has a word within it pull the name in another column" for easier identification.
Another alternative could be Power Query. In the attached file you can add data to the blue dynamic table. Then you can click in any cell of the green table and right-click with the mouse and select refresh to update the green result table.
The data layout in the screenshot and in the attached file is for illustration. You can as well place the green result table in another worksheet.
- LisaMarie1981Feb 20, 2024Brass ContributorThanks Oliver...this would be great but I get this error when I try to refresh
[Expression.Error] we cannot convert the value null to type Text- OliverScheurichFeb 20, 2024Gold Contributor
The expression error occurs if no city is entered for a first and last name.
If it should be possible to enter first and last name without at least one city then the query must be changed accordingly. For example with a changed query the result could look like in the screenshot below where the first and last name is entered under "no city entered" if there isn't an entry for city in the blue table.
- LisaMarie1981Feb 20, 2024Brass Contributor