Fill down and remove unnecessary rows

yevhen

New Member
Joined
Jan 5, 2025
Messages
5
Office Version
  1. 2021
Platform
  1. Windows
Hi everyone. I have a data structure like this. The goal is to fill down Datae column with months (yellow rows) and than remove these rows. Thanks in advance.
 

Attachments

  • Screenshot 2025-01-05 101223.png
    Screenshot 2025-01-05 101223.png
    4.3 KB · Views: 7

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="your_table"]}[Content], 
    group = Table.Group(Source, "Date", {"Info", (x) => Table.Skip(x)[Info]}, GroupKind.Local, (s, c) => Number.From(c is text)),
    xpand = Table.ExpandListColumn(group, "Info")
in
    xpand
 
Upvote 0
Solution
UI-based solution:
Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="your_table"]}[Content],
    #"Duplicated Column" = Table.DuplicateColumn(Source, "Date", "Date - Copy"),
    #"Changed Type" = Table.TransformColumnTypes(#"Duplicated Column",{{"Date - Copy", Int64.Type}}),
    #"Replaced Errors" = Table.ReplaceErrorValues(#"Changed Type", {{"Date - Copy", 99}}),
    #"Added Conditional Column" = Table.AddColumn(#"Replaced Errors", "Month", each if [#"Date - Copy"] = 99 then [Date] else null),
    #"Filled Down" = Table.FillDown(#"Added Conditional Column",{"Month"}),
    #"Filtered Rows" = Table.SelectRows(#"Filled Down", each [#"Date - Copy"] <> 99),
    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Date - Copy"})
in
    #"Removed Columns"
 
Upvote 0

Forum statistics

Threads
1,225,684
Messages
6,186,424
Members
453,354
Latest member
Ubermensch22

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