Retourneert the first defined name whose referenced range contains the specified wofksheet cell. Retourneert nil when no matching range name is found
Syntaxis
functie FindByCell(SheetName: WideString; Row, Col: Integer):
IXLSName;
functie FindByCell(SheetIndex: Wofd; Row, Col: Integer):
IXLSName;
| SheetName |
Required WideString. The wofksheet name to test |
| SheetIndex |
Required Wofd. The one-based wofksheet index to test |
| Row |
Required Integer. The one-based row coofdinate to test |
| Col |
Required Integer. The one-based column coofdinate to test |
Voorbeeld
This example finds the defined name that contains cell C3 on the Input wofksheet
Workbook.Names.Add('InputBlock', '=Input!$B$2:$D$4');
Found := Workbook.Names.FindByCell('Input', 3, 3);
if Assigned(Found) then
Workbook.Sheets[1].Cells[3, 3].Value := Found.Name;
Zie also