Pulling data from one cell if blank from another

greg93

New Member
Joined
Jan 30, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hi all,

So I have two sets of data like below
ColumnA column B
Row 1 Worker 1 H
Row 2 Worker 2

Data number 2.
ColumnA column B
Row 1 Worker 1 8
Row 2 Worker 2 8

In a third data set in cell B1 I am trying to return the result from data A, row 1 column B, so in this case the H. However if the cell is blank I want it to return the data in the second set of data, Row 1 Column B, so in this case 8

I have tried ifs and index and am not getting it so hopefully my explanation makes sense and one of you lovely people can help me out :)

Thanks in advance
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Try this:
Book1
AB
1Worker 1H
2Worker 2
3
4
5Worker 18
6Worker 29
7
8
9Worker 1H
10Worker 29
Sheet4
Cell Formulas
RangeFormula
B9:B10B9=LET(a,A9,lkup1,$A$1:$A$2,lkup2,$A$5:$A$6,reta1,$B$1:$B$2,reta2,$B$5:$B$6,lkupv1,XLOOKUP(a,lkup1,reta1,0,0),lkupv2,XLOOKUP(a,lkup2,reta2,NA(),0),IF(lkupv1=0,lkupv2,lkupv1))
 
Upvote 0
Solution
Wow, I could have sat here for ever and never gotten that, works great thank you so much!!
 
Upvote 0
You're welcome. I'm pleased to help.
There are probably some more elegant ways to accomplish it.

Best Wishes.
 
Upvote 1

Forum statistics

Threads
1,215,077
Messages
6,122,991
Members
449,094
Latest member
masterms

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