small excel question

stevejh123

New Member
Joined
Mar 3, 2005
Messages
5
I need help with a small formula.

What I need to know is how would I take the value of cell (B) if the value in cell (A) = what i tell it.

Like

if a cell in coloum a = mike then give me the number beside it in coloum B
So what I would need is if coloum A1:A100= mike then give me the number beside mike in coloum B that would be 5

A B
1 mike 5
2 bob 2
3 jim 3
4
5

Thanks

Steve
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
have you tried the VLOOKUP formula?
vlookup(A1,A1:B10,2)
This gives the value in cell Bx that corresponds to Ax
saranat
 
Upvote 0
There are a number of ways you can do this but most depend on how many variations you are going to have, if you only have a couple of variaitions the easiest way is to use an IF statement:

put this formula in B1
=IF(A1="MIKE",7)

if you want to put a 7 in column B anytime column A has the value MIKE
 
Upvote 0
Are there one or many matches?

If you want the sum of all the matches:

=SUMIF(A1:A100,"mike",B1:B100)

If you want the number from the first match, perhaps:

=VLOOKUP("mike",A1:B100,2,0)
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,820
Members
449,049
Latest member
cybersurfer5000

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top