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...??

ABC
1112OCTOCT
1112OCTNOV
1112OCTDEC
1113FEBFEB
1113FEBMAR
1114AUGAUG
1115MARMAR
1115MARAPR
1115MARMAY
1115MARJUN
1116SEPSEP
1116SEPOCT
1116SEPNOV

<tbody>
</tbody>


thankyou in Advance.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
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,214,429
Messages
6,119,424
Members
448,896
Latest member
MadMarty

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