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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
use Sumif()

e.g.

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

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

toy4x4

New Member
Joined
Jun 27, 2005
Messages
14
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.
 

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
"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)
 

Forum statistics

Threads
1,141,095
Messages
5,704,311
Members
421,338
Latest member
Pepess

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
Top