So I

Jenni98812

New Member
Joined
Feb 18, 2021
Messages
10
Office Version
  1. 365
Platform
  1. Windows
So this is a bit hard to explain...
I have a sheet containing data of all 50 states in columns a sort of yes/no of availability in each state. There are instances when one row contains "READY TO SELL" in multiple cells in the row.
I need to be able to return the Column header Value (ie, AL, AR, AZ... Etc) to a new column AND copy the row if there is a second, third, or more state that is ready to sell.
So in theory, say the record in Row 4 in the example pic I included, it would have one record with AL, and a second record with FL, and also copy the row data to both records.

Thanks!!

1613690724910.png
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi,

I hope it will help.

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Date"}, "Attribute", "Value"),
    #"Uppercased Text" = Table.TransformColumns(#"Unpivoted Other Columns",{{"Value", Text.Upper, type text}}),
    #"Filtered Rows" = Table.SelectRows(#"Uppercased Text", each [Value] = "READY TO SELL"),
    #"Changed Type" = Table.TransformColumnTypes(#"Filtered Rows",{{"Date", type date}, {"Attribute", type text}, {"Value", type text}})
in
    #"Changed Type"
 

Attachments

  • Outcome.JPG
    Outcome.JPG
    131.6 KB · Views: 9
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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