Extracting subdate for a group for every record separately

smg

New Member
Joined
Aug 22, 2012
Messages
14
Hello,

This has been a problem for me for a while but so far I've managed to deal with it manually.

I've a got the following table:


COLUMN ACOLUMN B
Planned Delivery Date : 01-08-2012
x1y1
Planned Delivery Date : 02-08-2012
x1y1
x2y2
x3y3
x4y4
x5y5

<colgroup><col><col></colgroup><tbody>
</tbody>

As you can see Planned Delivery Date is like a subtitle which is valid for all below records until the next date appears. The number of dependent records is not constant.
I'd like to extract Planned Delivery Date for each record separately so the date appear in, for example, column C in every line (except for blanks in A).
I've got another sheet which, with help of a macro, present the data in the way I want. My idea so far is that I could used formula FIND("Planned Delivery Date") and if the value and if it's >0 then do the vlookup for every filled cell in Column A until another FIND >0.
I don't mind using a standard formula as I have another spreadsheet in the same workbook which pulls out the data from the sheet above. The problem is, I don't know how to get there.

Knowing how to do what I described above would be very helpful not only for this particular task but for many others.


Cheers,
Slawek
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Assuming the first "Planned Delivery Date" data line is on Row 1, put this formula in C2 and copy it down as needed...

=IF(OR(B2="",LEFT(B2,21)="Planned Delivery Date"),"",IF(LEFT(B1,21)="Planned Delivery Date",TRIM(RIGHT(SUBSTITUTE(B1," ",REPT(" ",99)),99)),C1))
 
Upvote 0
Hi Rick,

First of all thank you for your reply.

I inserted the formula but it gives blank cells.


Do you have any other solution to this issue?

Regards,
Slawek
 
Upvote 0
Hi again Rick,

I removed the spaces from " " (SUBSTITUTE formula) and it works perfectly.


Thanks very much!

Slawek
 
Upvote 0

Forum statistics

Threads
1,214,812
Messages
6,121,693
Members
449,048
Latest member
81jamesacct

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