Excel 2007: If a value in col H = a value Col C put the value of Col B in Col i next to its matching value in Col H

simple question and need a formula to work like this:

If a value in col H = a value Col C put the value of Col B in Col i next to its matching value in Col H

Can give me a button to click if want or an easy way to implement in my spreadsheet.

Thank you.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Patrick MatthewsCommented:
You can do this with a formula in Col I:

JaseStAuthor Commented:
Thank you, but how do I implement it? Put it in the top row of Col i and copy down?
JaseStAuthor Commented:
because inserting that formula in Col i did nothing
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

You may use this formula and apply it for the whole Col. I:

Open in new window

JaseStAuthor Commented:
how do I apply it? inserting the code produces a blank cell in col i
It should produce a blank cell if H and C are different.
Or else what do u want it to display?
"how do I apply it? inserting the code produces a blank cell in col i"

Insert the formula in column I, but then make sure that there is a value in cell B1, and that H1 equals C1. If these conditions are not met, the formula would still be working correctly by returning a blank.


JaseStAuthor Commented:
the value in row h2 is not the same as the value in row c2. the value could be anywhere in col C
I reccon you need a vlookup.
Type this into cell I1:
barry houdiniCommented:
Hello JaseSt

I'm assuming you want it to work like this:

Let's assume that H2 matches with C13 then you want to put the value from B13 in I2? If so then you can't use VLOOKUP in it's usual form because you want to retrieve a value from a range to the left of the lookup range, so use INDEX and MATCH, i.e. in I2 copied down


If H2 doesn't find a match in column C then that will give you an #N/A error. You can add IFERROR function to avoid that, i.e.


Replace "No match" with any text you want or leave the quotes empty ("") for a blank

see attached example

Note: if you have a large amount of data in column H then you can easily "fill down" the formula like this:

Paste formula into I2 and select that cell

Put cursor on bottom right corner of the cell until you see a black "+" - this is the "fill-handle" - double-click and the formula will automatically fill all the way down as far as you have data in an adjacent column.

regards, barry

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JaseStAuthor Commented:
Wow! That is a beautiful thing. Thank you barryhoudini. And, thank you to all the rest who answered as well, but barryhoudini gave exactly what I needed and explained it well enough for a novice like me to understand. I will use this formula again and again, I know.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.