I want to add unique in values in a row.
Example
Column A consists of names:
Column A
John
Wayne
Jack
Tom
Sam
Tom <--- It should give error because tom already entered.
This should happen only in this column. In column B, C or any other I can add same names. Is there any way to validate one column this way in Excel? I have searched and tried validations but it did not work.
Help me here.
No programming is required for this.
Select cell A1 and apply Data Validation to it using the formula:
=COUNTIF(A:A,A1)
Then copy A1 and PasteSpecialValidation downwards.
Related
I'm trying to compare membership rosters which contain 2 columns each for first name and last name. If the names match I want to add conditional formatting and a value in a 5th column. (I'm trying to determine who is a member and who is an external contact.)
I've tried to adapt some formulas found here but no luck.
For example:
If Jon and Doe exists in A & B and C & D on any row as long as Jon and Doe are together in both columns, than I would like to add conditional formatting to Jon and Doe in column A & B and add the word "Member" in a separate column. If Jon Doe only exists in columns A and B, then add the word "External" instead of Member. My example image can explain better.
I got this close but am not able to adapt it to use labels much less conditional formatting. I'm happy to ditch conditional formatting if it's too complex.
=INDEX($N:$N,MATCH(1,(A2=$L:$L)*(B2=$M:$M),1))
Conditional Format Formula, applied to A2:B4 in the sample data
=IFERROR(MATCH(1,($A2=$C:$C)*($B2=$D:$D),0)>0,FALSE)
Status Formula
=IFERROR(IF(MATCH(1,($A2=$C:$C)*($B2=$D:$D),0)>0,"Member",""),"External")
Note the $'s anchoring A and B columns
Currently, I am working with a scenario where I have 0 to 6 names in the field. For example, A2 has Bob Smith and Jone Random. Below is an example how they look in a check.
Effi Liu
<- (enter/gap)
Kevin Xing
Basically, I want to generate a 1 column that counts how many people in A2. For example, two people and then create a function that will separate. Each of the names into different columns.
If you have the names separated by the Enter Key in Column A, use the below formula in Column B and drag it to the right upto 6 or more cells and then drag down,
=TRIM(MID(SUBSTITUTE(SUBSTITUTE($A1,CHAR(10),"#"),"#",REPT(" ",999)),(COLUMN(A:A)-1)*999+1,999))
This formula splits your name strings with the Enter Key as the delimiter into multiple columns as you drag. You could then use COUNTA function to find the non-blank cells (number of names). I leave that part to you to google and find it. Hope this helped you.
I'm trying to make the most user-friendly excel spreadsheet I can. This spreadsheet takes a name that the user puts in for a client, sometimes a first name and sometimes first and last. I have another sheet with the full list of clients, first and last names.
What I need to do is look at the user input, match that name to the client list sheet, and then paste that into the original sheet.
Example:
USER SHEET
A
1 Jane
2 Helen Smith
3 John
CLIENT LIST SHEET
A B
1 Johnson Jane
2 Smith Helen
3 Brown John
I need the User Sheet to look like
A B
1 Jane Johnson, Jane
2 Helen Smith Smith, Helen
3 John Brown, John
I know this might be a complicated formula, I've tried to write a whole bunch of different ones but none of them are really doing what I need them to.
Most of the problem is that I need other people I work with, who don't know how to use excel and sometimes aren't able to write the full names, to be able to use this spreadsheet once I have a generic formula in there, and all that would need to be changed is the Client List sheet.
Hopefully I provided enough detail in here. Thanks for any help you give me in advance, super appreciate it. If I find a solve I'll post it.
I have an idea. In your Client sheet, in the third column build a formula that combines first & last name, like:
=B1&" "&C1
Then select the range of names (columns A:C) and Insert Table (without headers). You can enter the header labels later:
From the Formulas Ribbon, open the Name Manager. Define a new name called "ClientNames" and have it refer to the fullname column (modify the Refers To formula based on your table's name & column header name):
Then, on your User Sheet, select column A, and from Data ribbon Data Validation. Allow "List" and set the "Source" formula to =ClientNames.
Finally, instruct your users to choose a client name from the validation list. This will prevent them from making bad inputs and also enforce a standard against the "Users" worksheet.
If you still need the formatted LastName,FirstName in column B, then do a formula:
=RIGHT(A1,LEN(A1)-FIND(" ",A1))&", "&LEFT(A1,FIND(" ",A1)-1)
This formula might be looking too complex but it is simple,
use this in column B of your user sheet and drag across the rows.
=IFERROR(INDEX(Sheet2!A:B,MATCH(LEFT(A1,LEN(A1)-FIND(" ",A1)),Sheet2!B:B,0),1)&", "&INDEX(Sheet2!A:B,MATCH(LEFT(A1,LEN(A1)-FIND(" ",A1)),Sheet2!B:B,0),2),IFERROR(INDEX(Sheet2!A:B,MATCH(LEFT(A1,LEN(A1)-FIND(" ",A1)),Sheet2!A:A,0),1)&", "&INDEX(Sheet2!A:B,MATCH(LEFT(A1,LEN(A1)-FIND(" ",A1)),Sheet2!A:A,0),2),IFERROR(INDEX(Sheet2!A:B,MATCH(A1,Sheet2!B:B,0),1)&", "&INDEX(Sheet2!A:B,MATCH(A1,Sheet2!B:B,0),2),IFERROR(INDEX(Sheet2!A:B,MATCH(A1,Sheet2!A:A,0),1)&", "&INDEX(Sheet2!A:B,MATCH(A1,Sheet2!A:A,0),2),""))))
This formula is for A1, you can modify it if you want to start from searching A2. Let me know if you need help. This might look big but its very useful for dragging across ranges.
So here is my situation: I need to take two spreadsheets in excel and combine the data together so that any additional data is paired up with common data between the cells. Here's an example of what I mean.
Sheet 1
1234567, JOHN, DOE, 1234567.JPG
Sheet 2
JOHN, DOE, 6634
First and Last names are common data, but the number in the second sheet does not exist in the first. The user list in both sheets are slightly different from each other so I can't simply alphabetize the names and move the additional column over. I have about 500 users to go through and may have to use what ever solution I come up with for similar lists of users.
Any assistance would be great.
There's various techniques you can use to combine data but you'll have to be a bit more specific. For example is there a fixed number of columns that sheet 1 doesn't have that sheet 2 does?
The basic technique would be to create some sort of unique identifier, perhaps by concatanating the names together in both sheets? that way you can use VLOOKUP to put all the missing data in one sheet into the other
Not sure I understood "I cant alphabetize the names". However, if the names have the same spelling i.e John is John in both sheets you can concatenate John and Doe in sheet 1 and do same in sheet 2 and use a vlookup function. Something like
A=cellcontainingJohn&CellcontainingDoe in sheet1
B=cellcontainingJohn&CellcontainingDoe in sheet2
C= Vlookup(A,rangeforB,columnnumber)
Here's what I would do:
Select the sheet into which you want to pull data from the other. I'll assume we're pulling data from sheet 2 into sheet 1.
In sheet 2, insert a column to the left of what you have already. JOHN is now in column B, DOE in column C, and 6634 in column D.
In sheet 2, column A, row 2 (assuming you have a row of column headers) which is currently empty, use the formula
=CONCATENATE(B2,C2)
Now, head back over to sheet 1. Let's assume you also have a row of column headers in sheet 1, so the cell immediately to the right of your 1234567.jpb is E2 and it's empty. In E2, use the following formula
=IFERROR(VLOOKUP(B2&C2,'Sheet 2'!$A:$D,4,FALSE),"")
That should give you what you're asking for, if I understand your question correctly.
I have an excel spreadsheet with two rows. One is for name, and the other is for id. Is there any way i can find the rows that have the exact same id and allow me to easily see those? For example i have the rows:
Name: Id
Hello 1
World 5
Mylo 1
Jack 6
Jil 9
Frank 5
So in the above example data, excel should somehow mark the rows with hello and mylo and world and frank to indicate that there are duplicate id's for those
The absolute fastest and easiest way. Conditional formatting, highlight duplicates (on the ID column). Then filter the column (presumably in a table) by the coloring (above the check boxes).
In the third column you could add this formula (cell B3 example) :
=IF(COUNTIF(B$2:B$7,"="&B2)>1,"<--Dup!","")
You will have to adjust the range B$2:B$7 to reflect the actual data range...