简体   繁体   中英

Excel, get string value on cell

How do I get the cell from a string? I'm counting the number of times a specific string occurs on another worksheet. I have this formula:

=COUNTIF('Season 1'!$D$2:$F$1768,"*Player 1*")

Instead of having to do this manually with all other players, how do I reference the cell containing the string "Player 1" without having to manually type the string into the formula?

If your list of players starts in cell A1 then try

=COUNTIF('Season 1'!$D$2:$F$1768,"*" & A1 & "*")

then copy down

So you don't want to type player 1, 2, 3 etc. into each formula? - in which case type player 1, 2, 3 in cells and then reference them. Like:

=COUNTIF('Season 1'!$D$2:$F$1768,"A1") - assuming A1 contains player 1 for example.

Is that what you mean? If you could upload the data that would help!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM