0

I'm trying to figure out how to find if a row contains a string and if it does, find if it doesn't contain 0, and ideally show the number or string containing the non-zero number.

Ex:

  h                        i         j             k             l  .. ah 
6 1 : Count of hread = 60  other   
7 dir                      not found 0 : Count of hread = 60 

Before I changed my output to show the count number, it was just a yes/no type of thing and my ah cell had a formula like: =IF(COUNTIF(H25:AE25,"hread = 60"),"YES","NO")

But now I am showing the count and it's showing as 0 but I don't care about ones with count of 0.

How do I do the formula so it only shows in column ah, ones that aren't a count of 0? If I can also show ones with a count that isn't 0 and also what the string shows for the count/output, that would be great. I was looking at regular expressions, but I'm not sure how to do this in excel, or if there's a better way: regex.

This is using Excel 365/OneNote version, but older versions of excel formulas are fine.

So you can see, the string is 0: Count of hread = 60, so I want to find ones without the 0:, and hopefully return the number before the semicolon in the non-zero cases.

Michele
  • 3,617
  • 12
  • 47
  • 81
  • 1
    "Find it doesn't contain 0" vs. "find a number that isn't 0" are two different things, which is it? Also, can you clean up your example input? It's a bit hard to follow. – Rogue Jul 12 '22 at 13:34
  • @Rogue - I cleaned up example input. I want to find rows where Number isn't 0. We won't get a 10 most likely, but it's the ones that are 0 that I want to not find in my summary column. FYI the spreadsheet columns do not contain similar content in each row. – Michele Jul 12 '22 at 14:55

0 Answers0