Find Values in Random Cell Within A Column

emisa

New Member
Joined
Jan 12, 2014
Messages
28
Office Version
  1. 365
Hi there,

Newbie here. I am tryingn to figure out a formula where I can refer a cell (containing a date) within a specific column, say in Column A, I have A7 containing a date and rows below are blank A8 and so forth, then A26 has another date, and rows below are black once again. I am hoping to combine FIND, INDEX, and MATCH but somewhere Im lost. E9 down to E25 must have the formula where it will show the date from A7, but this changes in E28 and so forth where it must show the new date. Thanks heaps for your help!!!
 

Attachments

  • Screenshot 2025-01-05 at 11.44.25-min.png
    Screenshot 2025-01-05 at 11.44.25-min.png
    144.2 KB · Views: 14

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
My first suggestion is to use the forums Excel Add-In to share your Sample Data... along with an example of what results you are expecting to achieve. You'll have to hard code those values of course.
However, I'm thinking XLOOKUP is what you're looking for...
 
Upvote 0
Please see table and the comment on the far right hand side of the sheet. Thanks in advance. appreciate your help.



_Report Output_CMDHB Daily Staffing Sheet PH_04002843_2024-12-29T12_36_59.390(44).xlsx
ABCDEFGHIJKLMNOPQRSTUVWXY
1CMH Daily Staffing Sheet
2Time Period :30/12/2024 - 05/01/2025Executed on :29/12/2024 12:36
3Query :All HomePrinted for :Raeina, Naomi
4
5
6ShiftsShift StartLabelJobNameStartEndHoursNotes
7Monday 30/12/2024
807:00
912/30/24TIME NOT CONFIRMEDACCNOster, Jessica L07:0014:307.5* Column E must show the date from A7, A26 and so on.
1012/30/24C0700-1930C0700-1930ACNMFarrell, Jo A07:0019:3012.5* This sheet will be a template where there will be raw data in another sheet. Hence the rows containing the date may move up or down depending on the number of staff scheduled for the that date.
1112/30/24C0700-1530 Admin DayC0700-1530 Admin DayACNMGilhooly, Andrew J07:0015:308.5* The data in Column E (the date from a refererenced Cell) may also show or not show depending on the value in Column G. Column G is deemed true if shows "C0700-1900", "C1900-0700" etc….
1212/30/24C0700-1530 CCC0700-1530 CCCCLester, Whitney J07:0015:308.5
1312/30/24C0700-1730C0700-1730CNSCulverwell, Pamela D07:0017:3010.5
1412/30/24C0700-1530C0700-1530CNSJenkins, Nicole A07:0015:308.5
1512/30/24C0700-1930C0700-1930HCATateishi, Seiko07:0019:3012.5
1612/30/24C0700-1930C0700-1930HCAKumar, Poonam S07:0019:3012.5
1712/30/24C0700-1930C0700-1930HCAHeka, Ninette S07:0019:3012.5
1812/30/24C0700-1730C0700-1730NMDevoy, Kathleen L07:0017:3010.5
1912/30/24C0700-1930C0700-1930RNSmith, Chloe J07:0019:3012.5
2012/30/24C0700-1930C0700-1930RNBrady, Kelly F07:0019:3012.5
2112/30/24C0700-1930C0700-1930RNGibb, Lochlain J07:0019:3012.5
2212/30/24C0700-1930C0700-1930RNHapalla, Marcelino I07:0019:3012.5
2312/30/24C1900-0730RNKuriachan, Honey19:0007:3012.5
24C1900-0730CRNSarasakshan Pillai, Arun19:0007:3012.5
25C1900-0730CRNAltena, Paul G19:0007:3012.5
26Tuesday 31/12/2024
2707:00
2812/31/24TIME NOT CONFIRMEDACCNOster, Jessica L07:0014:307.5
2912/31/24C0700-1930C0700-1930ACCNSturrock, Christine M07:0019:3012.5
3012/31/24C0700-1530 CCC0700-1530 CCCCDavis, Rachel A07:0015:308.5
3112/31/24C0700-1530C0700-1530CNSJenkins, Nicole A07:0015:308.5
3212/31/24C0700-1730C0700-1730CNSCulverwell, Pamela D07:0017:3010.5
3312/31/24C0700-1930C0700-1930HCAKafa, Vika F07:0019:3012.5
3412/31/24C0700-1930C0700-1930HCAUta, Ofisa C07:0019:3012.5
3512/31/24C0700-1930C0700-1930HCATaviliniu, Evaata07:0019:3012.5
3612/31/24C0700-1930C0700-1930HCARuiterman, Asuncion07:0019:3012.5
3712/31/24C0700-1730C0700-1730NMDevoy, Kathleen L07:0017:3010.5
3812/31/24C0700-1930C0700-1930RNSmith, Chloe J07:0019:3012.5
3912/31/24C0700-1930C0700-1930RNPetrie, Elizabeth M07:0019:3012.5
Report
Cell Formulas
RangeFormula
G9:G22,G28:G39G9=IF(H9="","TIME NOT CONFIRMED",H9)
 
Upvote 0
Hello, if you have Excel 365, you could e.g. try in E7:

Excel Formula:
=IF(ISBLANK(A7:A39)+ISBLANK(C7:C39)<2,"",SCAN("",A7:A39,LAMBDA(a,b,IF(b<>"",b,a))))

Alternatively you could try:

Excel Formula:
=IF(OR(ISNUMBER(A7),ISNUMBER(C7)),"",IF(ISNUMBER(A5),A5,E6))
 
Upvote 0
What version of Excel are you using?
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Another option
Excel Formula:
=IF(G9="","",LOOKUP(10^9,A$7:A9))
 
Upvote 0
Solution
What version of Excel are you using?
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Another option
Excel Formula:
=IF(G9="","",LOOKUP(10^9,A$7:A9))
Thank you for your help!! Code works!!!!
 
Upvote 0
Thank you for your help!! Code works!!!!
The marked solution has been changed accordingly. In your future questions, please mark the post as the solution that actually answered your question, instead of your feedback message as it will help future readers. No further action is required for this thread.

BTW, here is an even simpler formula that I think does the same thing.

Cell Formulas
RangeFormula
E9:E23,E28:E39E9=IF(A7,A7,E8)
 
Upvote 0

Forum statistics

Threads
1,225,481
Messages
6,185,249
Members
453,283
Latest member
Shortm88

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