If cell is blank then search for Value above.

kiasor

New Member
Joined
Apr 29, 2019
Messages
13
Office Version
  1. 365
Platform
  1. Windows
Morning all,

I am sure someone here on MrExcel will be able to help with this as the community is so knowledgeable.

I will attach a file image to help explain what i am trying to do.

But basically:

  • Column H (Actual finish date has some blanks)
  • Column A is order A-Z and if the value in column A is the same then i want to copy the date down into the blanks
  • The curve ball is that further down this database there could be 20+ blanks attached to the same order number with a date only on the top order.
I can solve it if there is just one blank underneath - i inserted another column before H and i used the formula =IF(A16=A15,I15,I16) like so:
 

Attachments

  • Mr excel.JPG
    Mr excel.JPG
    164 KB · Views: 3

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Apologies i pressed post before inserting correctly. This is the formula working for a single cell gap.

But i need it to search upwards until it finds a date then copy down.

I am not adverse to using VBA if you can find a solution that way i have VBA loops for other things.

PS the columns are blank in the middle because its sensitive information, usually they are full of data.

Mrexcel2.JPG
 
Upvote 0
What version of Excel are you using?
Please update your account details to show this, as it affects what functions you can use.
 
Upvote 0
Apologies Fluff - its office 365. Build version 2002 currently.
 
Upvote 0
Thanks for that, could you have an order number that has dates in col I on more than one row, or will there only be one date for a particular order number?
 
Upvote 0
Good question!

Just checked down the list a bit further in the full version.

  • There will always be at least one date attached to an order number - with X blanks
  • And some are actually full and do not have any gaps.
  • Some have a couple, but have gaps, E.G 4 out of the 7 lines for example, filled with dates on the same order
PS - the Date will always be the same on the same order. If there are 8 lines and 5 lines have the date in - that will always be the same date and i just need to fill the other gaps with that date.
 
Upvote 0
Ok, in that case how about
+Fluff New.xlsm
ABCDEFGHI
1CountyIntroduced
2Berkshire 01/01/1980
3Berkshire01/01/1980
4Berkshire01/01/1980
5County Durham 01/01/2005
6Cumbria 01/01/1980
7Derbyshire 01/12/1997
8East Riding of Yorkshire 01/01/1980
9Essex 01/01/1980
10Essex01/01/1980
11Greater London 01/01/1985
12Greater London01/01/1985
13Greater London01/01/1985
14Greater London01/01/1985
15Hampshire 01/06/1996
16Hampshire01/06/1996
17Hertfordshire 01/10/2009
18Hertfordshire01/10/2009
19Hertfordshire01/10/2009
20Leicestershire 01/01/1986
21Leicestershire01/01/1986
22Leicestershire01/01/1986
23Lincolnshire 01/08/2007
24Merseyside 01/07/1986
25Norfolk 01/01/1980
26Northamptonshire 01/12/2001
27Nottinghamshire 01/01/2006
28Nottinghamshire 01/05/2006
29Nottinghamshire01/05/2006
30South Yorkshire 01/01/1980
Data
Cell Formulas
RangeFormula
H2:H30H2=IF(I2<>"","",LOOKUP(2,1/(A$2:A2=A2)/(I$2:I2<>""),I$2:I2))
 
Upvote 0
Wow.

That is amazing!! Really great stuff - Thankyou.

I just filled down the entire 30,000 columns.

Is there a way to then bring over the cells from the original column into the inserted column which didn't need any actions? the ones colored in yellow? is that the concatenate function? or could it be in the formula?

Mrexcel 3.JPG


Finally - and this really is the icing on the cake. - i found a few errors (it appears to be only where the date is somewhere in the middle?)

mrexcel 4.JPG


Mrexcel 5.JPG
 
Last edited:
Upvote 0
Just looking at the formula, i can see its looking upwards in the date column, could it be adjusted to look up AND down?
 
Upvote 0
Ok, how about
+Fluff New.xlsm
ABCDEFGHI
1CountyIntroduced
2Berkshire01/09/2020
3Berkshire01/09/202001/09/2020
4Berkshire01/09/2020
5County Durham01/01/200501/01/2005
6Cumbria01/01/198001/01/1980
7Derbyshire01/12/199701/12/1997
8East Riding of Yorkshire01/01/198001/01/1980
9Essex01/01/198001/01/1980
10Essex01/01/1980
11Greater London01/01/198501/01/1985
12Greater London01/01/1985
13Greater London01/01/1985
14Greater London01/01/1985
15Hampshire01/06/199601/06/1996
16Hampshire01/06/1996
17Hertfordshire01/10/200901/10/2009
18Hertfordshire01/10/2009
19Hertfordshire01/10/2009
20Leicestershire01/01/198601/01/1986
21Leicestershire01/01/1986
22Leicestershire01/01/1986
23Lincolnshire01/08/200701/08/2007
24Merseyside01/07/198601/07/1986
25Norfolk01/01/198001/01/1980
26Northamptonshire01/12/200101/12/2001
27Nottinghamshire01/01/200601/01/2006
28Nottinghamshire01/05/200601/05/2006
29Nottinghamshire01/01/2006
30South Yorkshire01/01/198001/01/1980
Data2
Cell Formulas
RangeFormula
H2:H30H2=IF(I2<>"",I2,INDEX(FILTER(I$2:$I$30,($A$2:$A$30=A2)*($I$2:$I$30<>"")),1))
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,742
Members
448,989
Latest member
mariah3

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