Search Column For Text

toy4x4

New Member
Joined
Jun 27, 2005
Messages
14
Ok, here is what I am trying to do.

I have a spreadsheet with 27000 rows.

Column A is Text and Column B is a price. So what I need to do is search column A for the specific text of "value". If column A = "value" then I need to add the column b price in.

Example;

Column A Column B
Car $20000
Truck $20000
Truck $20000
Car $20000
Car $20000


So when i search Column A for "Car", I get a total of $60,000. When I search Column B for "Truck" I get $40,000.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
use Sumif()

e.g.

=Sumif(A:A,"Truck",B:B)

You can replace "Truck" with a cell reference housing the word.
 
Upvote 0
use Sumif()

e.g.

=Sumif(A:A,"Truck",B:B)

You can replace "Truck" with a cell reference housing the word.

That worked great, another question though.

What if column B was text. So if the rows looked like the following:

A.........B
Car.....Toyota
Truck...Chevy
Truck...Ford
Car......Honda
Car......Ford

So now on a row if it says Car, I want the "Toyota" text.
 
Upvote 0
"Car" shows up 3 times in column A, each with a different make in column B. Do you want the 1st occurance?

e.g. =Vlookup("Car",A:B,2,0)
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

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