Jenni98812

New Member
Joined
Feb 18, 2021
Messages
8
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

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

arunsjain

Board Regular
Joined
Apr 29, 2016
Messages
108
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: 4

Forum statistics

Threads
1,141,060
Messages
5,704,041
Members
421,324
Latest member
Devo182

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
Top