So i am looking to write a macro that would basically select a range, compare the values in the cells with values from say an array and add the missing ones to the end of the range.
相关问题
- Excel sunburst chart: Some labels missing
- Error handling only works once
- Error handling only works once
- Excel formula in VBA code
- Excel VBA run time error 450 from referencing a ra
相关文章
- Get column data by Column name and sheet name
- programmatically excel cells to be auto fit width
- Unregister a XLL in Excel (VBA)
- Unregister a XLL in Excel (VBA)
- How to prevent excel from truncating numbers in a
- numeric up down control in vba
- Declare a Range relative to the Active Cell with V
- What's the easiest way to create an Excel tabl
Try this example using strings:
To get you started, you could use Cells(row#, column#), instead of Range("A1") and perform loops over the array and loop through the cells by row, comparing each value. Then adding the values that don't match to a new array, that you will later pass back into the sheet in another loop.
Assuming your values start at Sheets("Sheet1").Range("A1"). With the following example names: Sam, Jim, Stanly, Jeff, Mike, Jeff, Toby.