How to have cell reference as part of argument in google sheet function

Viewed 28

How can I include a cell reference and have it evaluated inside the argument of a Google Sheets function? For example:

=COUNTIFS(Sheet1!E:E,"\*D1\*")

In the above example, I want D1 to be replaced with the value of that cell so that the function becomes something like

=COUNTIFS(Sheet1!E:E,"\*blabla\*")

If D1 contains "blabla".

1 Answers

Try the following

=COUNTIFS(Sheet1!E:E,"\*"&D1&"\*")
Related