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

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
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: 8
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,409
Members
448,959
Latest member
camelliaCase

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