"It was me" is ungrammatical; however, you may well hear it.
"It was I" (It was I who shouted/said no) is grammatical but unnatural in most situations.
The natural answer is, "I did." Note that just saying "I" is incorrect.

Student or Learner
Teacher : who just said no? Or who was it, who just shouted?
Student: I. Is it correct or do we need to use "Me" here? Like "it was me."
Please check.
"It was me" is ungrammatical; however, you may well hear it.
"It was I" (It was I who shouted/said no) is grammatical but unnatural in most situations.
The natural answer is, "I did." Note that just saying "I" is incorrect.
Or you can avoid the conundrum altogether and say, "I did".
Remember - if you don't use correct capitalisation, punctuation and spacing, anything you write will be incorrect.
Ninety-nine out of a hundred Americans would say It was me. The other one is a retired English teacher who believes, despite abundant evidence to the contrary, that our language does not have a disjunctive pronoun.
I am not a teacher.
The single-word answer to 'Who said "No"? is 'Me' — not 'I'.
NOT A TEACHER
Hello, Tufguy:
According to traditional rules, we should say:
It is I.
It is he.
It is she.
It is we.
It is they.
The usual explanation is that "is" is a linking verb. Both sides should have the same case. That is to say, we would never say "Me is it" instead of "I am it." (Thus: "It is I.")
As the teachers have reminded us, it is now more "natural" to say "It is me / him / her / us / them."
*****
I am an elderly person who likes and tries to follow traditional rules -- at least in writing. When I speak, however, I do not have time to think about rules, so I no doubt would say, "It is me," for that is what I always hear.
I'm not sure I agree with Parser; changing the word order can completely change the sense of the utterance (cf. Bob hit Mark vs. Mark hit Bob). It was me is acceptable if you admit that people are using both "it" and "me" in a different sense than you seem to expect, "it" impersonally invoking the agent of the situation, and me being the object complement of the predicate to that grammatical subject. It was me is fine, as long as this is the way it is seen. 'Twas I is definitely not on, these days, nor is anything similar.
Some old-fashioned English teachers continue to say that it's me is ungrammatical. Nearly every native Anglophone says it that way though, not it is I as these teachers prefer. You should choose it is I if you have to answer a question on an exam, but you can confidently say it's me in conversation and in writing.
I am not a teacher.
Bookmarks