'Check if array variable arru row 1 column r3 is equal to array variable arr1 row r1 column 2
If arru(2, r3) "" And arru(1, r3) arr1(r1, 2) Then Exit For 'Check if value in array variable arru row 2 column r3 is not equal to nothing AND array variable arru row 1 column r3 is not equal to array variable arr1 row r1 column 2 ReDim Preserve arrd(UBound(arrd, 1), UBound(arrd, 2) + 1)įor r3 = UBound(arru, 2) To LBound(arru, 2) Step -1 'Add another column to array variable arrd
'Save value in array variable arr1 row r1 column 3 to array variable arrd row 2 column r3 plus one 'Save value in array variable arr1 row r1 column 2 to array variable arrd row 1 column r3 plus one 'Save value in array variable arr1 row r1 column 1 to array variable arrd row 0 column r3 plus one If r3 = UBound(arrd, 2) Then ReDim Preserve arrd(UBound(arrd, 1), UBound(arrd, 2) + 1) 'If True add another container to array variable arrd 'Check if number in variable r3 is equal to the upper bound in array variable arrd 'Check if array variable arrd row 1 column r3 is equal to array variable arr1 row r1 column 2 If arrd(2, r3) "" And arrd(1, r3) arr1(r1, 2) Then Exit For 'Check if value in array variable arrd row 2 column r3 is not equal to nothing AND array variable arrd row 1 column r3 is not equal to array variable arr1 row r1 column 2 'Check if the value in array variable arr1 row r1 and column 2 is equal to value in array variable arr1 row r1 -1 snd column 2įor r3 = UBound(arrd, 2) To LBound(arrd, 2) Step -1 'Save boolean value False to variable chk 'Clear cell range "A3:C" & Lrow from valuesįor r1 = LBound(arr1, 1) To UBound(arr1, 1) 'Save values from cell range "A3:C" & Lrow to array variable arr2 'Start macro Recursive with parameter pth2 'Clear values in cell range cell range A3:C? 'Save values from cell range A3:C? to array variable arr1 Lrow = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row 'Find last non-empty value in active worksheet 'Start macro Recursive using variable pth1 as a parameter 'Disable screen refresh while macro is running to speed things up 'Show another dialog box and ask for a path to the second folder
With Application.FileDialog(msoFileDialogFolderPicker) 'Show a dialog box and ask for a path to the first folder 'Dimension variables and declare data types
How to highlight row of the selected cell programmaticallyĬount text string in all formulas in a worksheet Ĭopy worksheets in active workbook to new workbooksĬreate comment if cell value is larger than columnĪuthor: Oscar Cronquist Article last updated on April 15, 2021 How to create a list of comments from a worksheet programmatically
How to save specific multiple worksheets to a pdf file programmatically
Multiply numbers in each row with remaining rows in cell range (UDF)