# For each chance in column A, copy column B and fill down in column C

#### Angus_12

##### New Member
Hi All,

I'm looking for a for a macro or formula that recognises a change in Column A, then at each change, it copies the same row from column B, pastes the value to column C and fills the next months downs until the next change in column A. At the moment I have Column A and B however I want it to create column C for me...??

 A B C 1112 OCT OCT 1112 OCT NOV 1112 OCT DEC 1113 FEB FEB 1113 FEB MAR 1114 AUG AUG 1115 MAR MAR 1115 MAR APR 1115 MAR MAY 1115 MAR JUN 1116 SEP SEP 1116 SEP OCT 1116 SEP NOV

<tbody>
</tbody>

### Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

#### CyrusTheVirus

##### Well-known Member
Welcome to the forums. Try the below, but it assumes your data starts in Row 2.

C2:
Code:
``=UPPER(IF(ROWS(\$B\$2:B2)=1,B2,IF(B2<>B1,B2,TEXT(DATE(2019,MONTH(1&C1)+1,1),"mmm"))))``

Last edited:

#### jtakw

##### Well-known Member
Hi,

Assuming your Column B months are Text:

C1 formula copied down.

#### Angus_12

##### New Member
Thank you both for posting this, it has worked perfectly!

greatly appreciated.

Regards.

#### CyrusTheVirus

##### Well-known Member
Cool. You're welcome.

Last edited:

#### jtakw

##### Well-known Member
You're welcome, welcome to the forum, and thanks for the feedback.

Replies
1
Views
65
Replies
4
Views
40
Replies
3
Views
44
Replies
7
Views
122
Replies
3
Views
56