SOLVED

# Match data from another tab

Brass Contributor

# Match data from another tab

Hi there, I am looking for an index and/or match formula. The first shot is tab1 and I want to enter a formula in column E that matched column D to column A in Tab 2 and returns the same GL code from tab 2 to column E. So for example the first one meals & entertainment would return code 6701 in column E. TIA

3 Replies
best response confirmed by LisaMarie1981 (Brass Contributor)
Solution

# Re: Match data from another tab

One way with data in tab2/sheet2 formatted as Table named 'TableGL':

in D2:

``````=IF([@CATEGORY] = "", "",
XLOOKUP([@CATEGORY], TableGL[CATEGORY], TableGL[GL CODE], "No match")
)``````

or - with data in tab1/sheet1 not formatted as Table:

``````=IF(C2 = "", "",
XLOOKUP(C2, TableGL[CATEGORY], TableGL[GL CODE], "No match")
)``````

# Re: Match data from another tab

@Lorenzo thank you so much for this!!

# Re: Match data from another tab

You're welcome & Thanks for providing feedback and marking as answered
1 best response

Accepted Solutions
best response confirmed by LisaMarie1981 (Brass Contributor)
Solution

# Re: Match data from another tab

One way with data in tab2/sheet2 formatted as Table named 'TableGL':

in D2:

``````=IF([@CATEGORY] = "", "",
XLOOKUP([@CATEGORY], TableGL[CATEGORY], TableGL[GL CODE], "No match")
)``````

or - with data in tab1/sheet1 not formatted as Table:

``````=IF(C2 = "", "",
XLOOKUP(C2, TableGL[CATEGORY], TableGL[GL CODE], "No match")
)``````