Auto populate 2 Colums in a ROW on a sheet based on anther colum that would be pulled from a list

Hell0 - I use Calc version 6.4.7.2…
I have slowly been switching everything away from Windows to a Linux system and Libre Office. So far loving it.

I have a worksheet that I dump all the transactions each month from two credit cards in. I create a new tab at the bottom for a new sheet for each card per month and label it accordingly. (i.e - March 2022 US BANK)
Then I get rid of the columns that are useless. And two - Category and Subcategory…
I then go through each transaction and manually put in the Correct Category and Sub-Category for that row.
After that I use the SUBTOTAL function to see the breakdown and where the money is being spent that month. This is all part of our monthly budgeting.

I thought there should be a way I can have a list of Categories and Sub-Categories and the system do the work for me by looking at the correct cell, reading the Data in that cell then filling out the Category and Sub for me.
For instance - a row that has Transaction NAME = UBER, would have a category of Transportation and a SUB of Car Service.

So I thought a simple V lookup would be the way to go. Nope not so simple.

I was wondering if anyone can put me on the path of an easy way to pull this off?
My gut tells me I am gonna have to write a macro of some sort then run it when I have the raw data on the sheet. But I am guessing at this point.

Any feedback would be great…

Please provide an anonymized sample file.
You can upload it here.
Thank you.


Do you mean like this:

Housekeeping book in Calc