Need help developing a custom formula - Google Sheets

RomoBot

New Member
Joined
Oct 25, 2021
Messages
14
Office Version
  1. 365
Platform
  1. MacOS
Basically I need raw data (on the right) to look like (the left)
Doesn't matter if cells B:D are concat together or split, the raw data can be either way, but I am struggling how to reconcile repeated values on different dates. Ideally this would all be done in one formula, but if needs to end up as steps that would be fine.

ABCDAB
1/5/23WashingtonOregonIdaho1/5/23Washington
1/5/23California1/5/23Oregon
1/5/23New York1/5/23Idaho
3/16/23WashingtonOregonIdaho1/5/23California
3/16/23California1/5/23New York
3/16/23New York3/16/23Washington
4/4/23WashingtonOregonIdaho3/16/23Oregon
4/4/23California3/16/23Idaho
4/4/23New York3/16/23California
9/16/23New York3/16/23New York
9/16/23Texas4/4/23Washington
4/4/23Oregon
4/4/23Idaho
4/4/23California
4/4/23New York
9/16/23New York
9/16/23Texas
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Possibly
ByCol.xlsm
ABCDEFGHI
1DateState
201-May-2023Washington01-May-2023WashingtonOregonIdahoCaliforniaNew York
301-May-2023Oregon16-Mar-2023WashingtonOregonIdahoCaliforniaNew York
401-May-2023Idaho04-Apr-2023WashingtonOregonIdahoCaliforniaNew York
501-May-2023California16-Sep-2023New YorkTexas
601-May-2023New York
716-Mar-2023Washington
816-Mar-2023Oregon
916-Mar-2023Idaho
1016-Mar-2023California
1116-Mar-2023New York
1204-Apr-2023Washington
1304-Apr-2023Oregon
1404-Apr-2023Idaho
1504-Apr-2023California
1604-Apr-2023New York
1716-Sep-2023New York
1816-Sep-2023Texas
2c
Cell Formulas
RangeFormula
D2:I5D2=LET(u,UNIQUE(Table2[Date]),m,MAX(COUNTIF(Table2[Date],u)),f,WRAPROWS(TEXTSPLIT(TEXTJOIN(",",0,BYROW(u,LAMBDA(x,TEXTJOIN(",",0,EXPAND(FILTER(Table2[State],Table2[Date]=x),m,,""))))),","),m),HSTACK(u,f))
Dynamic array formulas.
 
Upvote 0
The suggestion above is for Excel 365; not Google Sheets.
I looked at the description not the title. This is an Excel forum.
 
Upvote 0
The suggestion above is for Excel 365; not Google Sheets.
I looked at the description not the title. This is an Excel forum.
Dave note that we do allow "Google Sheets" questions here. We ask that they mention it in their title and/or post, and post it in the "General Discussion & Other Applications" forum. The OP did both of those things, so did everything correctly.

1697025078764.png


Also note that if you are using the "Unanswered threads" listing to look for and answer questions, it shows you exactly which forum each thread is found in (many people miss that):

1697025085581.png
 
Upvote 0

Forum statistics

Threads
1,215,945
Messages
6,127,840
Members
449,411
Latest member
adunn_23

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