Copying single cell value when multiples exist in one column in Excel - excel

I need to copy ID numbers from one spreadsheet with the raw data to the spreadsheet with the countifs formulas that works everything out for me. But each ID number has multiple entries so it is repeated many times in the ID column of the raw data sheet. I would like to copy one ID number for all of the ID numbers entered in the raw data sheet, is there a way to ask Excel to ignore these multiple entries and copy only one across? I've attached an example screenshot but I have thousands of entries so it would not be possible to do this manually. Thanks!

What version of Excel are you using? If you are using 365 or 2021 the UNIQUE function will do this. If an older version see this post: https://superuser.com/questions/49614/how-do-i-get-the-distinct-unique-values-in-a-column-in-excel

Related

duplicating and splitting a line if a cell has a specific value in Excel

I'm looking at writing something for the below in Python but I'm hoping that it can be done natively in Excel.
I have a sheet that contains multiple rows. Within column C, the recipient is listed. Each row basically contains data relating to the sender and recipientS of emails and so, there may just be one recipient or multiple:-
original data screenshot
What I'd like to do is to split on Column C (recipients) that contain multiple recipients into their own unique row and so, looking at the joe.bloggs#hotmail.com,jack#gmail.com example, I'd like this to be split on the , and for the two email addresses to be in their own rows together with the other values that exist in the row.
So, using the example above, I'd run the function/whatever is required and I'd end up with 6 distinct rows containing:-
What i'm looking to achieve
together with the content of the other values in the source row being copied over
Hope this makes sense and thanks in advance
UPDATE - I've been Googling this and think a Power Query may be the way forward.... I'm researching this further now

Return values from multiple rows across multiple sheets, using the same identifier

I have come across this problem often and I am hoping there is an efficient solution for this, one that I can replicate. I typically need to summarize data contained in multiple sheets of a excel (2016 or 365) or googlesheet. I create a report by adding a tab within the workbook. To generate the report, I use formulas to pull in some of the values contained in each sheet. Vlookups or Hlookups work for most use cases but only returns the first value using a unique identifier that is present in the report tab and in the other sheets. Where I run into issues is when I would like to return multiple values from a unique identifier. For context, I typically need each column of the report tab to pull in values from one column of another sheet. The tabs typically contain 1000s of rows so an efficient formula would. Any tips?

How to automatically populate column values into another sheet in Excel?

I have certain columns in sheet one of an excel file that looks like this.
The player No and the Player has been manually created while the Sold to column has been selected using data validation (list).
Right now the sheet two of the excel file looks like this.
Now the question is how do I automatically populate the values of Player No and Player into the respective team(s)?
Expected output is as follows :-
I am currently using Excel version 2013. Can you suggest whether I should use any formula or Macros to achieve this ? Many thanks in advance.
You need to filter data based on condition. There are many way to do that. One of approch is as following.
As per below screenshot use below formula
=IFERROR(INDEX($A$2:$A$7,AGGREGATE(15,6,(ROW($A$2:$A$7)-ROW($A$1))/($C$2:$C$7=$F$1),ROW(1:1))),"")
You have to adjust the formula for other team. For Sheet 2 just you need to refer Sheet 1 in formula like
=IFERROR(INDEX(Sheet1!$A$2:$A$7,AGGREGATE(15,6,(ROW(Sheet1!$A$2:$A$7)-ROW(Sheet1!$A$1))/(Sheet1!$C$2:$C$7=$F$1),ROW(1:1))),"")

Data consolidation using Columns

We sell our product via a number of different retailers. These shops send us reports of what they have sold and we need to import this into our new stock management system as a master file.
The stores do not and will not provide the data in a uniform way based on our desired template.
I therefore need a way of consolidating ranges of data that without having a unique ID for each line, with minimal manual formatting from the data importer to help save time.
http://s14.postimg.org/arslbnnxt/excelconsolidation.jpg
As you can see in the 2 examples above, nothing is in the same order and some of the supplied fields haven't been used. The column headers are static, only the data is actually pasted.
I've tried using the Excel Data consolidation tool but the SUM function just wants to add everything up or simply reports a single value, I've played with Vlookup but I then need to dedicate a number of rows to each store which results in lots of empty rows.
If you can point me in the right direction I'm more than happy to research the tool or function I need, web searches keep bringing me back to the consolidation tool.
Many thanks,
Since you say that column headers are static, you actually do have a unique ID.
The task can be accomplished by using HLOOKUP with Column headers as lookup value.
However, the formula will depend on how you organize or store input sheets from different stores.
Here I have tested a setup where each store input is pasted in consecutive sheets starting from 'Sheet1'. i.e. Store1 in Sheet1, store2 in Sheet2 ... with row 1 containing header.
Then in consolidated sheet using helper columns for identifying sheet and row number, the formulas look like this
in A2 =IFERROR(HLOOKUP(A$1,INDIRECT("Sheet"&$H2&"!A:O"),$I2,0),"")
in H3 =IFERROR(IF(INDIRECT("Sheet"&H2&"!A"&I2+1)="",H2+1,H2),"") (if no more records, increment sheet number)
in I3 =IFERROR(IF((H3-H2)=0,I2+1,2),"") (if sheet number changed, reset row number to 2)
Initial value for H2 = 1 , I2 = 2
Test file: Storefile

Find and Compare Two Columns Excel (With Screenshots)

I have a spreadsheet that will occasionally get new data that I don't know the contents of, I just have to add it to the spreadsheet. Some of the new data is just updating rows that are already in the spreadsheet, and other data is adding new rows. I'm looking for a way to add a column that will tell me if something has changed in the row when I compare the old spreadsheet to the new one.
The sheets have one column that will always have a unique value among all the rows, so I can use that to match rows if the sheets aren't sorted the same way. Here are some screenshots to show what I'm trying to do:
Old Spreadsheet:
New Spreadsheet:
The only solution I can think of is a large nested IF formula that compares each column one by one, something like:
=IF(Old!B2=New!B2,IF(Old!C2=New!C2,"NO","YES"),"YES")
The problem with that is that it gets very hard to look at since my actual data is using 33 columns (not including this "Changed?" column) and new columns could be added in the future.
I'm not very technical with Excel, nor have I ever used VBA, so I apologize in advance if there is a simple/obvious solution that I'm missing.
Thanks in advance for your help.
Using your example, in the 'New' sheet cell D2 and copied down:
=IF(COUNTIF(Old!A:A,A2)=0,"YES",IF(SUMPRODUCT(COUNTIF(INDEX(Old!A:AG,MATCH(A2,Old!A:A,0),0),LEFT(A2:AG2,254)&"*"))=SUMPRODUCT(COUNTIF(A2:AG2,LEFT(A2:AG2,254)&"*")),"NO","YES"))
vlookup would also work well for this problem.
in D2, the formula would be:
=IF(AND(VLOOKUP(A2,Old!A:C,2,FALSE)=B2,VLOOKUP(A2,Old!A:C,3,FALSE)=C2),"NO","YES")
The column numbers (2 and 3) are the columns that correspond to the data you are trying to match, using the ID column.
It's possible to find the appropriate column using MATCH if the column names you have match the column names in the old sheet
This would make the formula look more complex, but Excel would adjust the Old!A:C reference if more columns are inserted.
The formula would look like this to match against column names
=IF(AND(VLOOKUP(A2,Old!A:C,MATCH($B$1,Old!$1:$1,0),FALSE)=B2,VLOOKUP(A2,Old!A:C,MATCH($C$1,Old!$1:$1,0),FALSE)=C2),"NO","YES")
The difference between this and the last one is the use of MATCH($B$1,Old!$1:$1,0) to find the column (using $s to anchor the lookup values)
In this case, specialized software for Excel compare is better.
My company use this software. Check it out.
http://www.suntrap-systems.com/ExcelDiff/
http://www.youtube.com/watch?v=QQgnWr_RT-8

Resources