A simple explanation of what I am trying to accomplish is this:
We have a .csv file that has a bit of post processing done on it. We take these 2 files and put them in 2 separate sheets within the same workbook in excel (done through VBScript). I then create a 3rd sheet and my goal is to write the Formula (=IF('Sheet1'!A1,A2,B1,B2,ect='Sheet1 (2)'!A1,A2,B1,B2,ect, 'TRUE', 'FALSE') into each cell of the 3rd sheet based off of the .UsedRange of the other 2 sheets.
I am able to access the .UsedRange of the 1st sheet and can manipulate the cell doing something like:
I have tried something similar to:
But I am at a lost when it comes to accessing the correct cells from the other sheets, and can't wrap my head around how to use a loop to manipulate the formula.
We have a .csv file that has a bit of post processing done on it. We take these 2 files and put them in 2 separate sheets within the same workbook in excel (done through VBScript). I then create a 3rd sheet and my goal is to write the Formula (=IF('Sheet1'!A1,A2,B1,B2,ect='Sheet1 (2)'!A1,A2,B1,B2,ect, 'TRUE', 'FALSE') into each cell of the 3rd sheet based off of the .UsedRange of the other 2 sheets.
I am able to access the .UsedRange of the 1st sheet and can manipulate the cell doing something like:
Code:
compareSheet.Range[COLOR=#000000]([/COLOR]tgtWorksheet.UsedRange.Address[COLOR=#000000])[/COLOR].Interior.ColorIndex [COLOR=#000000]=[/COLOR] [COLOR=#800000]4[/COLOR]
I have tried something similar to:
Code:
For Each cell In tgtWorksheet.UsedRange
compareSheet.Range(cell).Interior.ColorIndex = 4
Next
But I am at a lost when it comes to accessing the correct cells from the other sheets, and can't wrap my head around how to use a loop to manipulate the formula.