countif power query

ajm

Well-known Member
Joined
Feb 5, 2003
Messages
2,053
Office Version
  1. 365
Platform
  1. Windows
I currently use a Countif formula within a nested if statement to determine whether the word "Description" appears in an adjacent cell. I have begun converting the whole thing to power query but am struggling with the ISNA COUNTIF section. My formula looks at the cell containing a text string and if the first two characters are "UW", or it was a number, or did not contain the word "Description", it did A, if not it does B.

Excel Formula:
IF Text.Start([Contract],2)="UW" OR Value.Is((Text.Start([Contract],1),type.number*1) OR[B] ISNA(COUNTIF([Description],"*Description*")[/B])),

You can see above, I have recreated the Left(Cell,2) and the isnumber for the first character part of the formula. But have been unable to determine the final piece looking for "Description". Please help
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Why would COUNTIF return #N/A in your formula?

Most likely you want to nest something like List.Count(List.Select(...)) = 0 in PQ
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

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