Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a condition where I need to ensure at least 2 current selections have been made. Does anyone know how to get the number of current selections?
Do you mean selections in two different fields? If I don't miss anything more simple, this gives you the number of fields with selections in:
=if(len(GetCurrentSelections()),SubStringCount(GetCurrentSelections(),chr(13))+1,0)
If you mean selection within a field,you could use GetSelectedCount() function.
Regards,
Stefan
Do you mean selections in two different fields? If I don't miss anything more simple, this gives you the number of fields with selections in:
=if(len(GetCurrentSelections()),SubStringCount(GetCurrentSelections(),chr(13))+1,0)
If you mean selection within a field,you could use GetSelectedCount() function.
Regards,
Stefan
works! thanks!
I am using it in a button enable statement so I just cutout this part:
SubStringCount(GetCurrentSelections(),chr(13))
I would reduce this to
=Alt(SubStringCount(GetCurrentSelections(), Chr(13)) + 1, 0)
so it doesn't have to GetCurrentSelections() twice. (and because I love Alt even more than Excel's IFERROR)