Finding Date Rows and Filling Labels

copyboy007

Board Regular
Joined
May 17, 2005
Messages
60
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
 

Some videos you may like

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.

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,594
Office Version
  1. 2007
Platform
  1. Windows
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)
 

copyboy007

Board Regular
Joined
May 17, 2005
Messages
60
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
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,594
Office Version
  1. 2007
Platform
  1. Windows
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?
 

Watch MrExcel Video

Forum statistics

Threads
1,118,861
Messages
5,574,703
Members
412,612
Latest member
Shotokan
Top