ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VLOOKUP + IF ? (https://www.excelbanter.com/excel-discussion-misc-queries/454996-vlookup-if.html)

Amy H

VLOOKUP + IF ?
 
Does anyone know how to use Vlookup and If function together?

So if A contains a certain word, it will pull out the category from another category table (C=categorize, D= the word)

If A contains word "CPC", then I would like to have it categorized as "Shipping" next to the word "CPC".

CPC l Shipping
Pen l Office supplies

Seems pretty basic but can't figure out how.
Thanks in advance!

Claus Busch

VLOOKUP + IF ?
 
Hi Amy,

Am Wed, 18 Nov 2020 11:26:29 -0800 (PST) schrieb Amy H:

So if A contains a certain word, it will pull out the category from another category table (C=categorize, D= the word)

If A contains word "CPC", then I would like to have it categorized as "Shipping" next to the word "CPC".

CPC l Shipping
Pen l Office supplies


try:
=INDEX(Sheet2!C:C,MATCH(A2,Sheet2!$D$1:$D$100,0))

In the newer version you also could use:
=XLOOKUP(A2,Sheet2!$D$1:$D$100,Sheet2!$C$1:$C$100, "",0)


Regards
Claus B.
--
Windows10
Office 2016


All times are GMT +1. The time now is 08:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com