Excel - Wich Function should I use?

Joined
Mar 21, 2022
Messages
1
Reaction score
0
Hello dear community,

I want to automate my Excel spreadsheet using a function, but I need some help.

(English is not my native language)


Initial situation:
I have a file with payment transactions to different account holders:

Table 1:
Cell A1 = Name of the account holder
Cell A2 = Category (for example: Car; Sport; Insurance...)

Table 2:
Here are the categories to be assigned and which account holders belong to them.

My goal:
If there is a word in the name in Table1.A1 that is categorized in Table2, then I want Table1.A2 to contain the category that belongs to it.


What function can I use for this and what could be the formula for this?

If there is a similar thread already, you can also forward me a link.
 
Joined
Oct 19, 2021
Messages
14
Reaction score
0
I believe you want to look into using either VLOOKUP or XLOOKUP to accomplish what you want.

Assuming Table 2 has the name stored in column A and the category associated with that name stored in column B, then a very simple formula stored in Table1. A2 could look something like:
Code:
=VLOOKUP($A$1,Table2!A:B,FALSE)

This will return the category stored in column B of Table 2 that is associated with the Name entered into Table1. A1

This does not take into account possible duplicates (or misspellings), so if there is a chance you have multiple people with the exact same name or people with multiple categories then you may not get the result you're expecting.

If there is a word in the name in Table1.A1
I am uncertain what you mean by this? The formula above looks to match the entire field value. If you are looking to return a value based upon a part of the name entered into Table1.A1 then you'll need a more complicated formula beyond what I can probably help you with.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top