Finding Date Rows and Filling Labels

copyboy007

Board Regular
Joined
May 17, 2005
Messages
64
Office Version
  1. 2016
Platform
  1. Windows
Can a second column be added that finds the row with a date, then creates an entry matching the cell from the first row after the date above it?

Column A
-----------
1234
xyz
$5678
1/1/20
100908
abc
def $5577
$123
10/17/05

Column B
-----------
1234
1234
1234
1234
100908
100908
100908
100908
100908
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Try this

The text "Data" in the formula should be changed to what you have in cell A1, in my example in A1 I put "Data", so in the formula I have "Data"

Dante Amor
AB
1DataReference
212341234
3xyz1234
4$5,6781234
501/01/20201234
6100908100908
7abc100908
8def $5577100908
9$123100908
1017/10/2005100908
11
12
Hoja6
Cell Formulas
RangeFormula
B2:B10B2=IF(OR(A1="Data",LEFT(CELL("formato",A1))="D"),A2,B1)
 
Upvote 0
Changing 'formato' to 'format', the formula works for the given sample data.

I tried applying it to the raw data, but what needs to be changed when there's other data in the same cell as the date?

For example,

Column A
-----------
1234 2020202020
xyz
$5678
1/1/20 $101010
100908 3030303030
abc
def $5577
$123
10/17/05 $4040404040
 
Upvote 0
Changing 'formato' to 'format', the formula works
My mistake, failed to translate that part.


1/1/20 $101010
The formula is for a date, your example is now a text.
Will you have more scenarios to consider?
You could put your examples using XL2BB tool and most importantly, what result do you expect.
Could it be with a macro?
 
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,438
Members
449,083
Latest member
Ava19

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