All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
If you made two complete rounds starting from the Black Stone and ending at it then went to the second floor and resumed, then your circumambulation would be valid. That is because maintaining sequence in circumambulation is only recommended according to many scholars. We at Islamweb believe that this is the preponderant opinion. Moreover, the scholars who said that pilgrims must maintain sequence permitted a short break or a break for an excuse. It seems that you took a short break for going to the second floor. Even if the break was not short, then you still had the excuse of the crowd, and thus the validity of your Tawaaf was not affected.
Allaah Knows best.