VBA to Get Output by check relations from Input

Smerdis13

New Member
Joined
Nov 15, 2023
Messages
13
Office Version
  1. 2021
  2. 2019
Platform
  1. Windows
Hi Guys,
i know title is confusing so i start with the example:
I Have one Workbook which in "Input" Sheet i input names and Output is for example for one name is:
Row1: "Jack" "Walks" "to Catch" "MAN UNITED" "Tshirt"
Row2: "Jack" "Walks" "to Catch" "BARCELONA" "Tshirt"
How:
1- Input Name in "Input" Sheet then check with Vlookup from "Dictionary" for "Relation = Father" and "Family = Family1"
2-then in "Action" Sheet search only for "Family" in Column A (Type)
3-then for "Relation" Type from "Input" Sheet, search in "Action" sheet in Column J (Main Relation)
4-then for the exact "Target Relation" in Column I in "Action" Sheet and exact "Family" in "Input" sheet in Column I , search in "Relations" Sheet for column E (Target Fav Team)
5-then based on this structure, output will be made:
Sheet "Input".Range C & Sheet "Action".Range B & Sheet "Action".Range D & Sheet "Dictionary".Range D & Sheet "Action".Range H

Row1: "Jack" "Walks" "to Catch" "MAN UNITED" "Tshirt"
Row2: "Jack" "Walks" "to Catch" "BARCELONA" "Tshirt"

Another Example:
IF Input is: "Hannah"

Row1: "Hannah" "Drives" "to Catch" "REAL MADRID" "Tshirt"
Row2: "Hannah" "Runs" "to Buy" "JUVENTUS" "Video"
Row3: "Hannah" "Runs" "to Buy" "ARSENAL" "Video"
Row4: "Hannah" "Runs" "to Buy" "CHELSEA" "Video"

If INPUT is more than one names, Output should in sequence for each name after the other

Excel File:

Thanks in advance
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
I would recommend using the forums Excel Add-In to share your table data for other to help you better.
best regards,
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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