Microsoft Excel

Find Last in Worksheet

Activity finds the last occurrence of a given value in a given range.

find last in worksheet1
find last in worksheet2

Fill in Workbook Name position with custom internal name of your Excel file. Fill in Worksheet Name in properties window.

Fill in Text to Find with the value you want to find in range and choose Matching Type from the dropdown list.

Fill in Top and Bottom Row, as well as Left and Right Column to determine the limits of data range.

Activity returns the Out Row and Out Column of the searched value.

Activity returns an additional parameter Answer containing a Boolean value indicating whether any values were found, or not.

NOTE: Due to internal Excel logic, when trying to find the last occurrence of an empty string in a given range the result will be the first 'truly empty' row in data range instead.
This is potentially useful for finding the true number of data rows in an Excel file.

NameTypeCategoryDescription
Bottom RowInt32Inputrow number in Excel, searching area ends here
Left ColumnInt32Inputcolumn number in Excel, left border of the searching area
Matching TypeDropdownInputselect type to match from the dropdown list
Retry Timeout [s]DoubleInputdetermines behaviour if the activity fails to execute. value < 0: try executing once, 0: try indefinitely; value >0: time in seconds during which the activity repeatedly tries to execute (if time elapses without success then Result = False, end activity)
Right ColumnInt32Inputcolumn number in Excel (right border of the area)
Text to FindStringInputthe string to find
Top RowInt32Inputrow number in Excel (upper boundary)
Workbook NameStringInputcustom internal name Wizlink will use to identify the workbook
Worksheet NameStringInputname of the Excel sheet
Alternative Scenario If FailedBooleanMisccheckbox; default is "on"
Display NameLiteralMiscchanges display name of the activity
AnswerBooleanOutputreturns a Boolean value. True if searched value was found in range, otherwise will return False
Out ColumnInt32Outputnumber of Excel column (column numbers start from 1)
Out RowInt32Outputnumber of the Excel row found (row numbers start from 1)
ResultBooleanOutputreturns a Boolean value. True if no error in activity, otherwise will return False
Result CodeInt32OutputResult Code will return 0 if there is no error in activity, otherwise in most cases will return 1. See the table of Extended Result Codes for more info
FullscreenBooleanScreenshotcheckbox; default is "off"
Screenshot PathStringScreenshotdirectory path to save location
Show CursorBooleanScreenshotcheckbox; default is "off"
Window ScreenshotsBooleanScreenshotcheckbox; default is "off"