Hello everyone
What I want to do is to check wheter there are duplicates in a range.
As a formula, it is very easy. E.g. the range "A1:A10":
{=MAX(COUNTIF($A$1:$A$10;$A$1:$A$10))>1}
The above formula is not counting blanks, which is on purpose.
Now I want all that in VBA, which is causing some pain as I have no experience with anything but regular formulas in VBA.
From my level of knowledge, I'd like to achieve something like this:
The part between the ? obviously doesn't work like this![]()
If Application.?{=MAX(COUNTIF($A$1:$A$10;$A$1:$A$10))>1}? Then MsgBox = "blabla" Exit Sub EndIf
My question would be: Is there a solution in one line?
I could use Range.FormulaArray and create a dummy range for this, but I'd love to have a solution in one line, so that I can put it between If ... Then.
Any ideas or suggestions?
It might have to do with R1C1 or something like that. A term that popped up some times while checking the internet.
Unfortunately, I have no idea what the logic is behind this.
Thanks in advance
Bookmarks