formula to enter a % based on a word that appears in a cell

dstepan

Board Regular
Joined
Apr 16, 2009
Messages
160
Hi all

I can't even begin to determine how to approach what I would like to happen. Can I use a formula or should I use code?

I have an Inv # in col "A" and a Description in col "I".
I also have a table ("wordpercent") on a sheet "Info" with a list of words - Col "N" and a corresponding % - Col "O".

I want to place a formula in col "J" to return a corresponding % if any word in the Description col - Col "I" is listed in the table, and if it can't find a word in the list to then look at the Inv # - Col "A" and if it begins with a "1" or "6" then return the corresponding % - Col "O"

Below is a sampling of the data on "Sheet2". The actually data is hundreds of rows long.

Any help or ideas, even if it's a negative "no can do" is greatly appreciated.
Thank you


ABCDEFGHIJKLMNO
1Inv #CustomerOrder QtyUnit PriceExt PriceStatusDatePODescription%ProfitOil1%
215759-1a115.00$15.00Pending####Warranty Work0 Warranty4%
316420-1b128.00$28.00Complete####Warranty Leak Repair0 inbound4%
416426-1b122.00$22.00Complete####T&M Repair Work0outbound4%
516521-1b129.00$29.00Complete####removal and shipment0parts17%
616571-1a110.00$10.00Complete####CEDA Warranty Work0CEDA2%
716616D-Oa1142.70$307.80Active####Type II Oil delivery0FWI4%
816616E-Oa1132.70$305.10Active####Type II Oil Delivery0FWO4%
916616F-Oa1122.70$302.40Active####Type II Oil Delivery0 iInv # begins with 14%
1016616G-Oa1112.70$299.70Active####Type II Oil Delivery0 Inv # begins with 62%
1116624A-2b119.00$19.00Complete####Assist in repair work0
1216662-1e126.00$26.00Pending####0
13167o10.00$0.00Hold####0
1416705s15.00$5.00Complete####Counter0
1516712-1p119.50$19.50Pending####Warranty Work0
1661551x136.00$3,666.20Complete####Various parts0
1761552f147.00########Active####10 MRE Repair{DC}0
1861552FWIf12.60$2,690.00Complete####2 MRE Inbound Frt{DC}0
1961552FWOf12.60$2,690.00Hold####2 MRE Outbound Frt{DC}0

<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>


<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody></tbody>
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Assuming your table on the Info sheet is in N2:O10, try this formula in J2 and copy down:

=IFERROR(LOOKUP(2^16,SEARCH(Info!$N$2:$N$10,I2)/(Info!$N$2:$N$10<>""),Info!$O$2:$O$10),IF(OR(LEFT(A2)={"1","6"}),O2,"no match"))
 
Upvote 0

Forum statistics

Threads
1,214,400
Messages
6,119,292
Members
448,885
Latest member
LokiSonic

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