search cell if X and Y values are the same; search if X > Y; and search if cell does NOT contain

Mr2017

Well-known Member
Joined
Nov 28, 2016
Messages
644
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi

I've three quick questions, please:

1) Is it possible to create a formula which which can search for two different numbers in a cell and IF they are the same, return a result? Eg if a cell had "3 for 3" I'd like to return the words "same numbers"

2) If a cell had two values but X was greater than Y eg 5 for 3, I'd like to return "X greater than Y"

3) if a cell does NOT contain specific words eg "for" and "buy" I'd like to return "Fixed Price."

I've used the search function to return values eb with the data below, if the word "Now" is in cell A1 and the word "Extra" is in cell A2, then putting this formula in cell B1 will return "Price Cut" and dragging it down to B2 will return "Added Value" so I guess I need a variation of this formula? =IF(ISNUMBER(SEARCH("Now",A1)),"Price Cut",IF(ISNUMBER(SEARCH("Extra",A1)),"Added Value",""))

[TABLE="width: 144"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Now[/TD]
[TD]Price Cut[/TD]
[/TR]
[TR]
[TD]Extra[/TD]
[TD]Added Value[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I found a solution for question 3 above.

If the text "abc" is in cell A1 and this formula is in cell B1, then the formula will return a blank: =IF(ISERROR(SEARCH("abc",A1)),"Happy 4th of July","")
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,022
Latest member
RobertV1609

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