Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to compare two coloumns in excel and print the values of the matched rows in other coloumn in excel...

We have three coloumns A1,B1,C1.. we want to compare A1 and B1 if rows matches we want to print the values of desired C1 rows...

share|improve this question
Hi Pramod, welcome to SuperUser. This isn't really a good question for this site, would be a better fit. Also, they'll want to see some code - what have you tried so far? – Steve Jul 23 '13 at 8:01

Cell in Row C:


Instead of "result" you could put A1 or B1 or whatever you want.

share|improve this answer
Ya it's fine friend.. but i want to print the values of Coloumn C1.. itried that but don't work – Pramod Prem Jul 23 '13 at 8:03
@user - wasn't ripping off your answer, I just hit submit and yours had just notified "new answer" :/ – Steve Jul 23 '13 at 8:03
you know any other solutions using some other formulas like VLOOKUP or MATCH – Pramod Prem Jul 23 '13 at 8:05
@PramodPrem - see my edit. – Steve Jul 23 '13 at 8:07
@PramodPrem You might want to clarify what you mean exactly. And do post what you have already tried. – TheUser1024 Jul 23 '13 at 8:12

You'll need to research if in Excel. You'll end up with something like this:

=IF(A1>B1, "Larger", "Smaller")


  • Compare
  • What to do if true
  • What to do if false


From your comment:


should work.


If you want to compare one cell to a range:


Discussed here and here.

share|improve this answer
just assume coloumn A1 have 5000 rows and Coloumn B1 have only 120 rows remaining blank.. iwant to compare these. we get the matching rows after that i want to print the coloumn C1 'a value – Pramod Prem Jul 23 '13 at 8:08
Yeah, that's why we'll need some code to really understand your problem. Give me a second I'll try to figure it out. (A1 and B1 are cells, btw) – Steve Jul 23 '13 at 8:09
Actually there's no way anyone can understand what you mean without an example. Do you want to compare each of the 120 values to each of the 5000 values? Or, straight across? Or, what? Anyway, had a stab at it, good luck. – Steve Jul 23 '13 at 8:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.