In sheet Providers, Column C contails Text Names for companies. Colum D of the same row…
- User
In sheet Providers, Column C contails Text Names for companies. Colum D of the same row is the Name of the Sheet that holds the companies information. When I click on a sheet name in Column D, it opens up the associated companies sheet.
I would like the associated companies sheet, to identify the cell in Column D of Sheet Providers that I last clicked on and copy the value of Column C of the same row into the next available empty cell in column A of the companies sheet and also copy from the same row in Sheet Providers the value in Column B into Column D of the same row where it pasted the value into Column A.
- Assistant
- User
=COUNTIF(D,D3)=1 This formula in my data validation prevents duplicates from being entered. Is there a way of writing the code to allow for the text ADH to be duplicted
- Assistant
Yes, you can modify the COUNTIF formula to exclude the text "ADH" from the criteria. One way to do this is by using the OR formula to include two conditions:
=OR(D3="ADH",COUNTIF($D:$D,D3)=1)This formula will allow the text "ADH" to be duplicated, while still preventing any other text values in column D from being duplicated.
Alternatively, you can use the IF function to check whether the cell value equals "ADH" directly, and only apply the COUNTIF formula to other cell values:
=IF(D3="ADH",TRUE,COUNTIF($D:$D,D3)=1)This formula will return "TRUE" for any cell in column D that contains the text "ADH", and only apply the COUNTIF formula to other cell values to check for duplicates.