can a conditional format insert a comment if there is a duplicate cell in a column? - excel-2007

can a conditional format insert a comment if there is a duplicate cell in a column? If any cell in column "A" is a duplucate, then I want the cell highlighted to color blue and the comment to say "duplicate part_ID". please advise and provide me with complete code for me to copy and paste and instructions.
thank you very much, Nathaniel

Comments cannot be added, but an adjacent cell could house a warning message that is visible or not based on the condition.

Related

Excel Macro to validate 2 columns based on cell values

I am at initial stage in creating Macros. I know how to validate one column at a time, but not sure about validating a column reference to other column in the same row. Hope someone will help me with this!
Scenario: validate 2 columns in a spreadsheet (debit and credit columns).
Condition: For every filled row, I should have one of the two column values as "0",
highlight both the columns if non of the column value is "0".
Don't use VBA, use the built-in Conditional Formatting.
Assuming those columns are A and B, let's say A2:A10 and the Credit is B2:B10.
Go to Conditional Formatting, New Rule.
Select "Use a formula to determine ..." and type in =AND($A2<>0,$B2<>0,$A2<>"",$B2<>""). Then click "Format" and Fill Red.
Then click "Ok", "Ok" and change "Applies to" range to $A$2:$B$10.

How to use vba to filer a column using value from a specific cell

I want to use a macro to filter columns in a table. I want to filter for values that are higher than a value I want to put in cell, to be able to easily change the filter. Does someone have a trick for doing this with vba?
Many thanks, Bram
Record a macro whilst filtering a table on a column value. You would right click on the table column header of interest whilst recording the code and select Number_Filters > Greater Than and enter your desired number. That would give you the outline code. You can then amend the code to pick up the desired value from a specified cell. If applying filter to multiple columns record macro whilst doing this process over several columns.
Thank you for you answer. I tried this already, but I could not get the macro to pick from a specific cell. If I stored the value of the specific cell under as 'value' and put that in the outlined code, it would just do Greater Than value.. DO you have shortcut for this?
Thanks!

VBA Search Two Ranges and Execute action

I tried searching for some potential answers to this question but I suppose my issue is too specific and I can't apply solutions I found.
With above source I need to scan Column A and identify all John Doe's and afterwards for all John Doe I need to scan corresponding cells in Column B and if there is Date in any of them take the newest date and paste it into all corresponding cells.
So expected result would be:
Any hints on how to achieve this? I'm afraid my VBA skills are too weak.
In Excel 2013 and prior versions, this can be achieved without macros with an array formula. To use an array formula, type the formula in a cell (without { and }), then press Ctrl+Shift+Enter.
May I propose simple formula solution to your problem? if you have your email name in column A , and Dates in column B, enter this formula =MAXIFS($B$2:$B$100,$A$2:$A$100,A2) in cell B2 and drag it to the bottom. You should get this result. Adjust range inside formula to your needs.

Autopopulate data based on a reference cell in excel

I need excel to auto-populate data from A1:C20 to F4:H7 based on the employee ID (F2) that I input. I have no idea what function to use. I have attached a photo so you can see. Please and thank you!
I have used VLookup, but because the data is formatted in such a way I can't use that formula.
Employee Results
Enter the below formula in cell G4 and drag it down and then right to the next column,
=INDEX(B:B,MATCH($F$2,$B:$B,0)+ROW(2:2),0)
Whenever you change the ID, the values will be automatically populated. You need to handle the errors using IFERROR in case if you enter empty value in the cell F2.

Highlight duplicate values

In Excel, Office 2007, I have the option to highlight duplicate values on the menu. Keep simple! Select the column, select "Conditional Formatting" - "Highlight Cells Rules" - "Duplicate Values" and voilá! All values that were duplicate on this column it was paint with color red, for example.
Actually I use the LibreOffice Calc, version 5.0.3.2, and I can't find this option on the menu!
How can I do this job?
Select the column of numbers and note the 'active cell' (A1 in the sample image below). Go to Format ► Conditional Formatting and set up a rule as a formula using COUNTIF(A$1:A$15; A1)>1.
   
It is important to get the 'active cell' correct. If the 'active cell' was A15 then that formula would be COUNTIF(A$1:A$15; A15)>1.
I've also put the formula in column C so that you can see how each row resolved to TRUE or FALSE.
In LibreOffice Calc 6.0.7.3 this can be done by following these steps (from this link):
Select column A by clicking on the header character A (the top of the column)
Select the menu: Format -> Conditional -> Condition...
Condition 1: Cell value is and select duplicate from the dropdown
Apply Style: Select your cell style (e.g. Error or any you defined in advance)
Check that your cell range is A1:A1048576 (You may want to reduce the 1048576 to any reasonable number you assume will be the maximum to ever be used)
Click OK button
Not exactly the solution to this specific question, but I find the following comes in very handy when you have the column in question sorted, especially when you are sorting by multiple columns:
If you want to format any value in a cell that is a duplicate of the one immediately above it, select the entire column and use the following formula in Conditional Formatting
(INDIRECT(CELL("address"))=OFFSET(INDIRECT(CELL("address"));-1;0))
In a sorted column, the first occurrence of a value will be considered "unique" in that it hasn't occurred yet, and then all of the duplicates which follow immediately afterward are flagged (I usually use a light grey for the font color). If the column is not the major order (ie 2nd or later in the sort criteria) then the "uniqueness" is effectively "reset" each time sorting starts over for this column.