Apr 12 2024 03:24 AM
I have an excel work book contains with two sheet as Sheet1 and Sheet2. in Sheet1 there is three columns named Column A - Chasis Number , Column B - License ID and Column C - Chasis Number. in column A is filled by some data which is also repeated in Column C. In Column B Column B - License ID is related with Column C. in Sheet2 there is also three Column named Column A - Chasis Number , Column B - License ID and Column C - Chasis Number , but all column is empty. now i want to transfer the all repeated data of Column A and Column C with related data in Column B of Sheet1 to Sheet2
as per column wise as it is with any Excel Formula or VBA Code.
Hope i can get Cooperation from tech community team in this regards
Many thanks to all of tech community team member
@TARUNKANTI1964
Apr 12 2024 06:43 AM
Do you mean repeated Chasis Number could be the same in any row of column A and/or in any row of column C, not the same numbers in the same row? If the former, for which rows to take License ID?
Apr 12 2024 07:30 AM
Apr 12 2024 11:17 PM
Apr 13 2024 02:35 AM
More clear, thank you. However, still not sure how it shall work. Perhaps you may share desired results on small sample, let say source data (Sheet1) is like
What shall be for above data in output (Sheet2)?
Another question is on which Excel your are, is that 365? If not, which version/platform?
Apr 18 2024 10:41 PM
Respected @Sergei Baklan Sir,
Actually what that is what I want, You may find it which I shared in attached file as sample for Your understanding. Data shall be transferred as my per desire from Sheet 1 to Sheet 2 as per my attached Excel Book named “Sample in Short Form” According to Row wise. ROW number may be extended up to 30000 No's in every Sheet.
Platform - EXCEL 2016
Hope for Kind solicitation
With Humble Regards
@TARUNKANTI1964
Apr 19 2024 05:54 AM
For the sample file, let speak about Sheet2.
In column A you enter data manually, i.e. 61 in A2, 69 in A3, etc., correct? If not, what is the logic behind, how the shall be selected.
In column C we just repeat the number which is in column A. Other words
=A2 in cell C2
=A2 in cell C3
etc.
Now, since we have no duplicates in column C of Sheet1, we could find License ID as
=INDEX(Sheet1!B:B, MATCH(A2,Sheet1!C:C,0) )
and drag it down.
If we could have duplicates in column C (as well as in column A) of Sheet1, that could be another approach. But with that it's not clear how to place result, see my previous question.
Apr 20 2024 01:37 AM
Respected Sergei Baklan Sir,
Yes, repeated Chasis Number such as Chasis No. 61 which would be found in Sheet 1, Column – A and Row – 12 and it also must be found in Column – C, otherwise it will not be otherwise, it will definitely be found, actually data in Column B and in Column C is basic data and data in Column B is co related (fixed) with data in Column C row wise as per my shared excel book “SAMPLE IN SHORT FORM”
Now I need all Chasis No which would be found in Column A, which are repeated with Chasis No also definitely found in Column C along with License No as per Row found in Column B that would be Transferred with Excel Formula or Excel VBA Code to Sheet 2 as shown in my shared file as marking with RED Highlighted which I had done it manually from Sheet 1
With Humble Regards
@TARUNKANTI1964
Apr 20 2024 03:05 AM
Back to the sample. #61 in column A is red highlighted. We have the same number in column C. However, #39 is not highlighted, even if we have it column C. What is the difference between #61 and #39, why first is highlighted and second not?
Apr 24 2024 01:05 AM
Rrespected @SergeiBaklan Sir,
i want to let You know due to my language problem i don't quite understand my problem to You. for that reason i share again a Excel File where You will understand what i mean. Please see it in attached File.
Hope Your kind Cooperation will help me in this regard
With Humble Regards
Apr 29 2024 07:42 AM
So you select chassis by marking font in red. Formulae don't work with properties as color, to recognize it we need to use VBA. And keep workbook as macro-enabled.
First, we may add VBA function like
Public Function RangeFontColor(ByRef myRange As Range)
Dim i As Long
Dim eachCell As Range
ReDim myArray(myRange.Count - 1)
For Each eachCell In myRange
myArray(i) = eachCell.Font.ColorIndex
i = i + 1
Next
RangeFontColor = myArray
End Function
Next, assuming you are on Excel 365 or 2021, use formula in Sheet2
=LET(
colorIndex, 3,
colA, Sheet1!$A2:$A10000,
marked, FILTER( colA, TOCOL(RangeFontColor(colA) = colorIndex) ),
licenses, XLOOKUP(marked, Sheet1!C:C, Sheet1!B:B, "not found"),
chasis, XLOOKUP(marked, Sheet1!C:C, Sheet1!C:C, "not found"),
HSTACK( marked, licenses, chasis)
)
If you are on another version of Excel that could be fully VBA solution. The latest is not my territory, perhaps @Hans_Vogelaar or someone else could help.
Apr 29 2024 10:56 PM
Respected @SergeiBaklan Sir,
I am using Excel 2016,
I was selecting Chasis Number by Red Colour Font that is what You said in Your reply dated on 29-04-2024, actually I did that for ease of understanding and I selected particular Chasis Number, License ID and Chasis Number as per in Column A, B, and Column C respectively in Sheet 1 which will transferred to Sheet 2 as per Column wise. i describe in details at Sheet 2 in attached file
With Humble Regards
@TARUNKANTI1964
Apr 30 2024 07:19 AM
For the Excel 2016 that will be VBA solution, I can't help with it. You may wait if someone else suggests such solution; or start new thread, perhaps with reference on this one, mentioning directly you need solution for2016.
May 07 2024 01:11 AM
Respected @SergeiBaklan Sir
For Your understanding I have attached another sample like the one You showed me here. Please open the sample attachment I provided and You will understand what I really mean.
I am using Excel 2016
With Most Humble Regards
TARUN1964!
May 25 2024 12:51 AM
Respected Mr. @Sergei Baklan Sir,
You are correct. As per Your Suggestion I requested to Respected Mr. Hans Vogelaar Sir, and HE Helped me a lot to solve my problem. I used formula provided by Respected Mr. Hans Vogelaar Sir as below in Sheet 2
=IF(Sheet1!A2="","",Sheet1!A2) , in Cell A2
=IFERROR(INDEX(Sheet1!$B$2:$B$30001, MATCH(B2, Sheet1!$C$2:$C$30000, 0)), ""), in Cell B2.
=A2 in Cell C2
I am using Excel 2016
Many thanks to You for suggestion
With Humble Regards