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

Angus_12

New Member
Joined
Feb 24, 2019
Messages
2
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...??

[TABLE="width: 50"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1112[/TD]
[TD]OCT[/TD]
[TD]OCT[/TD]
[/TR]
[TR]
[TD]1112[/TD]
[TD]OCT[/TD]
[TD]NOV
[/TD]
[/TR]
[TR]
[TD]1112[/TD]
[TD]OCT[/TD]
[TD]DEC[/TD]
[/TR]
[TR]
[TD]1113[/TD]
[TD]FEB[/TD]
[TD]FEB[/TD]
[/TR]
[TR]
[TD]1113[/TD]
[TD]FEB[/TD]
[TD]MAR[/TD]
[/TR]
[TR]
[TD]1114[/TD]
[TD]AUG[/TD]
[TD]AUG[/TD]
[/TR]
[TR]
[TD]1115[/TD]
[TD]MAR[/TD]
[TD]MAR[/TD]
[/TR]
[TR]
[TD]1115[/TD]
[TD]MAR[/TD]
[TD]APR[/TD]
[/TR]
[TR]
[TD]1115[/TD]
[TD]MAR[/TD]
[TD]MAY[/TD]
[/TR]
[TR]
[TD]1115[/TD]
[TD]MAR[/TD]
[TD]JUN[/TD]
[/TR]
[TR]
[TD]1116[/TD]
[TD]SEP[/TD]
[TD]SEP[/TD]
[/TR]
[TR]
[TD]1116[/TD]
[TD]SEP[/TD]
[TD]OCT[/TD]
[/TR]
[TR]
[TD]1116[/TD]
[TD]SEP[/TD]
[TD]NOV[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


thankyou in Advance.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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:
Upvote 0
Hi,

Assuming your Column B months are Text:


Book1
ABC
11112OCTOCT
21112OCTNOV
31112OCTDEC
41113FEBFEB
51113FEBMAR
61114AUGAUG
71115MARMAR
81115MARAPR
91115MARMAY
101115MARJUN
111116SEPSEP
121116SEPOCT
131116SEPNOV
Sheet610
Cell Formulas
RangeFormula
C1=UPPER(IF(COUNTIF(A$1:A1,A1)=1,B1,TEXT(EOMONTH((B1&1),COUNTIF(A$1:A1,A1)-1),"mmm")))


C1 formula copied down.
 
Upvote 0
You're welcome, welcome to the forum, and thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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