Marc Fest
Marc Fest

Reputation: 33

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

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".

Upvotes: 1

Views: 93

Answers (1)

marikamitsos
marikamitsos

Reputation: 10573

Try the following

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

Upvotes: 1

Related Questions