Apr 14 2021 11:43 PM - edited Apr 15 2021 02:34 AM
Dear Excel community,
any help would be greatly appreciated!
I have 2 Excel files (attached) that look like the attachted screenshots which I need to compare for any errors. They are the same but they are structured diffrently. There are special cases coded like this: time period 00:00 - 00:00 which should be ignored. Basically the time periods need to be the same. If they are not the same I need to highlight the mistake. In this example they are no errors.
*Edit:
I am looking for the following type of error: One file has a time period which is not listed in the other file. The sum of hours for one day could be the same even though the time periods are not the same. I am not proficient in Excel but I think that some kind of Macro which restructers file1 to look like file2 (excluding the 00:00-00:00 time periods) would be good.
(File1)
(File2)
Info:
Windows Version: Microsoft Windows 10 Pro
Excel Version: Microsoft Office Standard 2016
Apr 15 2021 12:13 AM
Please read this information. It is of great help to you and everyone who would like to help.
https://techcommunity.microsoft.com/t5/excel/welcome-to-your-excel-discussion-space/m-p/2204395
Then, if I may recommend you, add a file (without sensitive data) and explain exactly what your plan is.
Thank you for your understanding and patience 🙂
Nikolino
Apr 15 2021 01:30 AM
Apr 15 2021 01:54 AM
There are always many ways of doing this in Excel.
Here is a small example with pivot, where you can expand the table and continue to calculate all times.
The time has been converted to decimal calculation: (Endtime - Startime) * 24
You can change this as you wish, see the formula in the table.
I would be happy to know if I could help.
Nikolino
I know I don't know anything (Socrates)
* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.
Apr 15 2021 02:17 AM
Apr 15 2021 12:50 PM
Have a look at this suggested solution in the inserted file ... although I don't think that's what you are looking for, my knowledge of Pivot ends here.
If maybe Mr. Baklan had time :))
Thank you for your understanding and patience
Nikolino
I know I don't know anything (Socrates)
Apr 15 2021 11:30 PM
Apr 16 2021 01:22 AM
There are many very good Excel experts here (do not mean me 🙂 like Mr. Sergei Baklan.
But such good insider knowledge, and knowledge of almost all Office versions, makes some people irreplaceable :).
As in the saying, "All are replaceable, only some people take a very, very long time" :).
The very good knowledge of English is always an advantage.
Since you got your help right away, I recommend that you rate Mr. Sergei Baklan's answer as the correct answer, so that other members can also benefit from it.
Thank you for your understanding and patience
Nikolino
I know I don't know anything (Socrates)
Apr 16 2021 04:45 AM
Apr 17 2021 05:31 AM
SolutionNot sure I understood correctly what is required. If the goal is to convert range as in File1 to one which is in File2
(from most left here to most right one), variant could be using formulas:
in F2
=IFERROR(INDEX(B:B,
AGGREGATE(15,6,1/
($B$2:INDEX($B:$B,COUNTA($B:$B))<>$C$1:INDEX($C:$C,COUNTA($B:$B)-1)) /
($B$2:INDEX($B:$B,COUNTA($B:$B)) <> 0) *
ROW($B$2:INDEX($B:$B,COUNTA($B:$B))),
ROW()-ROW($F$1)
)),
"")
copy and paste this cell to E2.
In G2
=IFERROR(INDEX(C:C,
AGGREGATE(15,6,1/
($C$2:INDEX($C:$C,COUNTA($B:$B))<>$B$3:INDEX($B:$B,COUNTA($B:$B)+1)) /
($B$2:INDEX($B:$B,COUNTA($B:$B)) <> 0) *
ROW($B$2:INDEX($B:$B,COUNTA($B:$B))),
ROW()-ROW($F$1)
)),
"")
Select E2:G2 and drag down till empty cells appear.
Apr 17 2021 05:31 AM
SolutionNot sure I understood correctly what is required. If the goal is to convert range as in File1 to one which is in File2
(from most left here to most right one), variant could be using formulas:
in F2
=IFERROR(INDEX(B:B,
AGGREGATE(15,6,1/
($B$2:INDEX($B:$B,COUNTA($B:$B))<>$C$1:INDEX($C:$C,COUNTA($B:$B)-1)) /
($B$2:INDEX($B:$B,COUNTA($B:$B)) <> 0) *
ROW($B$2:INDEX($B:$B,COUNTA($B:$B))),
ROW()-ROW($F$1)
)),
"")
copy and paste this cell to E2.
In G2
=IFERROR(INDEX(C:C,
AGGREGATE(15,6,1/
($C$2:INDEX($C:$C,COUNTA($B:$B))<>$B$3:INDEX($B:$B,COUNTA($B:$B)+1)) /
($B$2:INDEX($B:$B,COUNTA($B:$B)) <> 0) *
ROW($B$2:INDEX($B:$B,COUNTA($B:$B))),
ROW()-ROW($F$1)
)),
"")
Select E2:G2 and drag down till empty cells appear.