Reputation: 3880
[1/28/2023,$5]Description
In my google sheet, a cell of a column has above value. I simply want to search "$5" in the cell, if it exists, then returns 5, otherwise returns 0.
=iferror(if(search("$5",N25)>0,5,0),0)
This is the formula I have managed to write. But it feels like it is redundant. Is there any better solution for this?
Upvotes: 0
Views: 101
Reputation: 30089
well if you wish to hardcode the value then try:
=IFNA(REGEXEXTRACT(A2,"\$(5)"),0)
if its to extract N value attached to $ then try:
=IFNA(REGEXEXTRACT(A2,"\$(\d+)"),0)
Upvotes: 1