#1   Report Post  
Old November 18th 20, 08:26 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Nov 2020
Posts: 1
Default 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!

  #2   Report Post  
Old November 18th 20, 08:47 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2011
Posts: 3,823
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If (Vlookup 0) working, but what if Vlookup cell does not exist Steve Excel Worksheet Functions 18 November 18th 09 08:33 PM
Vlookup problem - unable to get the vlookup property Fred Excel Programming 2 August 22nd 08 05:23 PM
using a vlookup to enter text into rows beneath the vlookup cell Roger on Excel Excel Programming 1 November 29th 07 01:09 PM
Which is faster: VLOOKUP-worksheet or VB-array VLOOKUP? erikhs[_20_] Excel Programming 1 August 6th 06 06:18 PM
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) MikeR-Oz New Users to Excel 1 March 22nd 06 10:01 AM


All times are GMT +1. The time now is 01:55 PM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright 2004-2020 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017