# Excel if range of cell contain a text put a cell value in

Solved/Closed
diegomagum

TrowaD

- Posts
- 4
- Registration date
- Tuesday September 16, 2014
- Status
- Member
- Last seen
- October 1, 2014

TrowaD

- Posts
- 2886
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 27, 2022

Related:

- Excel if range of cells contains specific text then return value
- Excel if range of cells contains specific text - Best answers
- If cell contains specific text then return value in another cell vba - Best answers
- Excel if range of cells contains multiple specific text ✓ - Forum - Excel
- Excel conditional formatting if cell contains specific text ✓ - Forum - Excel
- Excel if cell contains specific date then return value ✓ - Forum - Office Software
- Highlight cell if another cell contains any text ✓ - Forum - Excel
- Excel: If Date =, then enter a value ✓ - Forum - Excel

## 3 replies

TrowaD

Sep 16, 2014 at 10:56 AM

- Posts
- 2886
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 27, 2022

Sep 16, 2014 at 10:56 AM

Hi Diego,

Your first question can be solved by using this formula in B1 and then drag it down as far as needed:

Your second question is a little strange, since Tom is at the first row. Meaning the value "13/2/2014" will not be entered at all.

Best regards,

Trowa

Your first question can be solved by using this formula in B1 and then drag it down as far as needed:

*=IF(A1="Sam","13/2/2014","")*Your second question is a little strange, since Tom is at the first row. Meaning the value "13/2/2014" will not be entered at all.

Best regards,

Trowa

Jul 12, 2021 at 04:30 AM

This really helped! May I know if you can also put many items on the "SAM" part? Like =IF(A1="Sam,Tom,Kim,Sean","13/2/2014","")? Thank you!

Jul 13, 2021 at 12:07 PM

Sure, we just need to add in the OR function:

=IF(OR(A1="Sam",A1="Tom",A1="Kim",A1="Sean"),"13/2/2014","")Best regards,

Trowa