If Cell Contains Formulas in Excel
The workbook provides a number of "If cell contains" formula examples that show how to return some text in
another column if a target cell contains a desired value.
Author
Last update
Tutorial URL
Examples:
• If cell contains any value
• If cell contains any text
• If cell contains any number
• If cell contains specific text
• If cell contains specific text string (partial match)
• If cell contains, then return value - multiple conditions
• If cell contains one of many text strings (OR logic)
• If cell contains several strings (AND logic)
• Depending on what cell contains, return different results
ell Contains Formulas in Excel
rkbook provides a number of "If cell contains" formula examples that show how to return some text in
column if a target cell contains a desired value.
[Link]
16-Oct-23
Excel: If cell contains formula examples
ontains any value
ontains any text
ontains any number
ontains specific text
ontains specific text string (partial match)
ontains, then return value - multiple conditions
ontains one of many text strings (OR logic)
ontains several strings (AND logic)
ing on what cell contains, return different results
Target cell Blank/Not blank
Apples Not blank
123 Not blank
1/1/2017 Not blank
Item Is text?
Apples Yes
123
Oranges Yes
1-Jan-17
Item Is number?
Apples
123 Yes
Oranges
1-Jan-17 Yes
Сase-insensitive Сase-sensitive If cell does not contain
Item Apples or not? Item APPLES or not? Item
APPLES Yes APPLES Yes APPLES
Bananas Bananas Bananas
Lemons Lemons Lemons
apples Yes apples apples
Bananas Bananas Bananas
Apples Yes Apples Apples
If cell does not contain
APPLES or not?
Not apples
Not apples
Not apples
Item Formula 1 Formula 2
Apples Apple Apple
Bananas Banana Banana
Eureka lemons Lemon Lemon
Golden apples Apple Apple
Goldfinger bananas Banana Banana
Green apples Apple Apple
Green bananas Banana Banana
Lemon Lemon Lemon
Lemons Lemon Lemon
Lisbon lemons Lemon Lemon
Red apples Apple Apple
Identifier A-
Return some text Copy cell Case-sensitive formula
Order Valid/Invalid Order Valid orders Order Valid orders
A-1002 Valid A-1002 A-1002 A-1002 Valid
B-1003 B-1003 B-1003
AB-1004 AB-1004 AB-1004
a-1005 a-1005 a-1005
C-1006 C-1006 C-1006
A-1007 Valid A-1007 A-1007 A-1007 Valid
SKU Formula 1 Formula 2 SKU contains one of these
Dress-Blue-S Valid Valid dress
Tshirt-White-XL skirt
Skirt-Pink-XS Valid Valid jeans
Dress-Blue-M Valid Valid
Skirt-Yellow-L Valid Valid
Tshirt-Black-M
Skirt-Yellow-L Valid Valid
Jeans-Blue-XS Valid
Dress-White-S Valid Valid
SKU Formula 1 Formula 2 Item Color
Dress-Blue-S Valid Valid dress blue
Tshirt-White-XL
Skirt-Pink-XS
Dress-Blue-M Valid Valid
Skirt-Yellow-L
Tshirt-Black-M
Skirt-Yellow-L
Jeans-Blue-XS
Dress-White-S
Nested IFs Lookup Vlookup
Item Abbriviation Item Abbriviation Item
Lemon L Lemon L Lemon
Banana B Banana B Banana
Lemon L Lemon L Lemon
Avocado Av Avocado Av Avocado
Banana B Banana B Banana
Apple Ap Apple Ap Apple
Vlookup Matches
Abbriviation Apple Ap
L Avocado Av
B Banana B
L Lemon L
Av
B
Ap