One formula with three different criteria

itsgrady

Board Regular
Joined
Sep 11, 2022
Messages
132
Office Version
  1. 2021
Platform
  1. Windows
  2. MacOS
Need 1 formula based on three different criteria. Spreadsheet-1 has a table with 3 columns of data (lookup array – Column B and C). Spreadsheet-2 has a table with 3 column of information (return array – Column B and C). Columns A on both spreadsheet has the matching data (the lookup value). Column C on spreadsheet-1 will be the column for the formula.

If Columns A on both spreadsheet matches and column B on spreadsheet-1 has data, return column B on spreadsheet-2 to column C on spreadsheet-1.

If Columns A on both spreadsheet matches and column B on spreadsheet-1 is empty, return column C on spreadsheet-2 to column C on spreadsheet-1.

If Columns A on both spreadsheet matches and column B on spreadsheet-1 has “INV01”, return “Dan Mann” to column C on spreadsheet-1.

I tried this and I also wanted to reference table and not the column is possible:

=IF(ISBLANK(B1), VLOOKUP(A1, 'Spreadsheet-2'!$A$1:$C$100, 3, FALSE), IF(B1="INV01", "Dan Mann", VLOOKUP(A1, 'Spreadsheet-2'!$A$1:$C$100, 2, FALSE)))

I only have access to my phone. I hope the paragraphs are understandable. Thanks for any help.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Perhaps this:

Excel Formula:
=IF(B1="INV01","Dan Mann",XLOOKUP(A1,'Spreadsheet-2'!$A$1:$A$100,IF(B1<>"",'Spreadsheet-2'!$B$1:$B$100,'Spreadsheet-2'!$C$1:$C$100)))
 
Upvote 0
Solution
Thanks for the help. Your formula with Xlookup works a lot better.thanks for taking time to help me.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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