Excel to remove duplicates (like a SELECT ID, max(Monday), max(Tuesday) - excel-2010

I've got a csv from a 3rd party that is imported into Excel that I cannot figure out how take the data that looks like this so that each row is collapsed down and the blanks are gone. In SQL I would just do a select on the fields I want and de-dupe those, then max on the others to get rid of the blanks. How would this be done in Excel?
Data:
Expected results:

Assumption:
1. you only need to do this once
2. Your source data starts at A1 (the headers)
3. The list of IDs are sorted and with fixed number of rows for each ID (6 rows in your example) .
Steps:
Create a new worksheet
Fill column B with the list of unique ID (in the same order as your data), start with B1
Fill column A with a serial number: 0,1,2,3,4.... up to the number of unique IDs, start with A1
Fill in column C the following formula
=TEXTJOIN("|",TRUE,OFFSET([src worksheet]!$B$2:$O$7,A1*4,0))
Then you should be able to use "TextToColumn" function to make the table you want.

Related

Google Sheets - Arrayformula Query Split debugging

I have a spreadsheet where I manually copy and paste some data from pdf tables.
I've been using array query split to split that info into different columns and it works flawless in 2 columns (date and amount) and for the other one it works most of the time (reference).
Example that works:
PDF DATA: 4500063794 21.07.2020 187.50
COLUMNS IN SPREADSHEET (final result after split): Reference:4500063794, Date:21.07.2020, Amount:187.50
Formula for retrieving Reference column: =ArrayFormula(QUERY(SPLIT(C3:C7 ;" ");"select Col1";0))
This works along the spreadsheet without any problems
Another example that works:
PDF DATA: 447/20.6TBOS 04.07.2020 804.00
COLUMNS IN SPREADSHEET (final result after split): Reference:447/20.6TBOS, Date:04.07.2020, Amount:804.00
Formula for retrieving Reference column: =ArrayFormula(QUERY(SPLIT(C3:C7 ;" ");"select Col1";0))
This works along the spreadsheet without any problems
Example that DOES NOT work:
If I paste several rows like 1st example and then add several rows as the 2nd example, when I paste afterwards more data like the one in 1st example, split stops retrieving the Reference column for pdf data similar to "447/20.6TBOS 04.07.2020 804.00" (2nd example). It retrieves blank cells for these.
Can anyone shine a light on this?
Thanks in advance
Example Spreadsheet
It will work if you change the query to:
=ArrayFormula(INDEX(SPLIT(REGEXREPLACE(C3:C7; "\s"; "♥");"♥");ROW(C3:C7)-ROW(C3);1))
The formula will replace the spaces by hearts (rare character) and then it will populate the rest.
To change the values of the rows, just change the last character 1 to 2 or 3:
)-ROW(C3); ==> 1 ))
You can use the same formula to the G column (don't forget to update the ranges), as the delimiters of both of the 4500063794 21.07.2020 187.50 and the 447/20.6TBOS 04.07.2020 804.00 are the same (whitespaces).

How to get row List elements compare by two rows Google Sheets

I have spreadsheet https://docs.google.com/spreadsheets/d/1qjvn90lZ7AWhYApChd2gAKHzZqmnNz4xlURENSQasaw/edit#gid=0 and i want to get rows with some differences by unique values Id and Updated at.
List №1 i have the same automatic importing data http://prntscr.com/t3axvt
In List №3 i try to use =UNIQUE('List1'!A2:A;'List1'!D2:D) http://prntscr.com/t3ayx8 but it didn't work
Question
i need to get rows from List1 if there are duplicates with these parameters Id and Updated at first row from duplicate rows (must be like this http://prntscr.com/t3b3nb) or last row from duplicate rows (must be like this http://prntscr.com/t3b3nb).
You can create a helper column to achieve this
Create a helper column J and put the below formula in J2
=arrayformula(if(D2:D7=OFFSET(D2:D7,-1,0),"",ROW(A2:A7)))
Then you'll be able to filter your data, put below formula in A10
=FILTER(A2:J7,J2:J7<>"")
Please amend your data ranges per your requirement
Please use ; instead of , if you in are different continent
for Extended Range, use below formula
=arrayformula(if(D2:D="","", if(D2:D=OFFSET(D2:D1000,-1,0),"",ROW(A2:A))))

How to create a list in a new column when data in another column is > ..% with the conditional formatting included?

I have a Google Sheets project with a table in there. The cells percentages change every now and then (external API kind of add-on) and I would like the column to be checked if a certain percentage is met. If it is, the corresponding name in column A should be copied in column D let's say. So example:
A formula something like: if a value of column C > 5%, copy the corresponding name in column A to a new column D. But the main thing is that it shifts everything up so there are no gaps. If I refresh the data, it should create the list again with no gaps and remove the former data that doesn't meet the requirements anymore. Please help!
P.S. I would also like the background color of column C (conditional) to copy to the new column
use QUERY
=QUERY(A2:A, "where A > 0.05")
and then all you need to do is select Greater then in CF rules:

How can I compare strings and sort them accordingly using an auto-generated Google Forms response sheet?

So my goal is to have every name on the roster in column A and then have the names of those who respond (not everyone will respond) in column B. I want column A to sort alphabetically. I want column B (and the corresponding columns with answers (C-E)) to only fall in line if the name matches. Otherwise columns B through E would be left blank. Any help would be appreciated. Thanks!
Make a new sheet with the roster names. After typing them, use the Google Sheets sorting tools to sort them.
Use the match function to identify the corresponding row in the first sheet for each of the roster names.
Once you have got the row, you can get the data for any cells in that row. See Get content of a cell given the row and column numbers .

How to import selected rows from one tab to another

I have Sheet 1 with categorized data. The 'Status' column is what I want to selectively use to pull rows from Sheet 1 -> Sheet 2. I'm trying to find the most straightforward way to pull over just Rows that have the status as 'Accept'. I was able to do this in a less concise, 2-step process of:
Column 1: Pull over Just name column of other sheet with criteria satisfied
=sort(filter('Data'!C2:C, {Status Cirteria}))
*This was only needed once, and the rest of the column was populated automatically via =CONTINUE().
Column 2: pull over the remaining data (rest of row) corresponding to that name
=filter(Data!$A$3:T, {NameCell}=RawData!$F$3:F)
*This was needed for every row.
I'd like to complete this process with just two functions that continue if possible, so I can eliminate user error associated with forcing the user to manually drag the second formula down for new entries.
Any Ideas?
Have you tried using query instead of filter?
Assuming the status is at column F:
=query(Data!A3:T;"select * where F = 'Accept'";1)

Resources