All,
I have a VB Script that is functioning properly but has two minor issues that I can't seem to fix.
Script Purpose: The script compares two worksheets. It uses comma separated entries in the 'CTP' sheet and attempts to find a corresponding match (via the Split and Find commands) in the 'SRTM' sheet. If a match is found, it copies the corresponding entry from Column A of the 'CTP' sheet to Column B of the 'SRTM' sheet.
Issue #1: It copies only the first split for each cell properly. It does not work for any of the subsequent splits in the For Loop, even though each split (array element) has a valid value and should be findable in the spreadsheet.
Issue #2: There are some cases where multiple matches occur and the script needs to be able to append a value to the cell rather than overwrite the value. This issue is with the following line: Sheets("SRTM").Cells(c4.Row, 2) = c3.Offset(, -1)
The script that needs to be reworked is below. The sample worksheets are attached as well.
Thanks in advance.
![]()
Please Login or Register to view this content.
Bookmarks