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

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
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,214,622
Messages
6,120,576
Members
448,972
Latest member
Shantanu2024

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