Hi Thai,
Your question:3.
It may be easier and more useful if I explain to you how to do this , because it is very simple:
There are three code lines that paste out all data to the result Tab
Each of those three code lines pastes out 2 columns of data in one go
3(i) To remove data from output
3(i)a) remove some data
Remove or 'comment out the code lines corresponding to the data you do not want to display.
For example, this code modification will remove the displayed data for the original Sheet1 and Sheet2 data
3(i)b) Remove headingsCode:' Let Ws3.Range("A2").Resize(UBound(arrSht1(), 1), UBound(arrSht1(), 2)).Value = arrSht1() Let Ws3.Range("C2").Resize(UBound(arrOut(), 1), UBound(arrOut(), 2)).Value = arrOut() ' Let Ws3.Range("E2").Resize(UBound(arrSht2(), 1), UBound(arrSht2(), 2)).Value = arrSht2()
If you wish to remove the headings ( Sheet1 Sheet1 Test Output Test Output Sheet2 Sheet2 ) , then simply Remove or 'comment out the code line
Code:' Let Ws3.Range("A1:B1").Value = "Sheet1": Ws3.Range("C1:D1").Value = "Test Output": Ws3.Range("E1:F1").Value = "Sheet2"
3(ii) To change position of output
The range for output is defined by giving the Top left cell of where you want the data, followed by resizing that to the size of the data held in the output array, arrOut().
__ Range("C2").Resize(UBound(arrOut(), 1), UBound(arrOut(), 2))
So if you change C2 to A1 , then you will get your data starting at the top left of the worksheet as you wish:
TopLeftA1.JPG : https://imgur.com/PZAZZlK
TopLeftA1.JPG
TopLeftA1 .JPG : https://imgur.com/PZAZZlK
TopLeftA1 .JPG
_.___________________________________-
Your question:4:
Please try to delete one item on the NEW tab list and use your code. It will not display the different. so it should be good if it can show the different if the item got deleted.
example Toyota and supra listed on A and B column before and now it got deleted.
This is not a straight forward modification to the existing code. This is because the code modifies the check array , arrSht2Chk() , when checking for the data from sheet1 in sheet2
One way to solve the problem is to make a second check array, arrSht2ChkKopie(), with identical entries. This is then used in Rem 3b in a Second Loop ##### similar loop to the Main Loop ============
( this may not be the most efficient way, as this is often the case when modifications are made in a code )
The modified code is here : http://www.excelfox.com/forum/showth...0746#post10746
( For the purposes of the demo I have not made the changes that I explained above in response to your question 3 )
Here is an example of the results of the modified code, if I delete, as you suggested, Toyota Supra from Sheet2 : http://www.excelfox.com/forum/showth...0747#post10747
_._________________________
Your questions, 1 and 2:
I do not understand exactly what you are asking. Please explain again and I will look at this laterOriginally Posted by Thai
_.___________________________________
Your question
This should not be too difficult to do. I will look at this laterOriginally Posted by Thai
_._____________
Alan





Reply With Quote

Bookmarks