Select the category and keep on selecting whichever subcategory is closest to your product. Once, you have selected the closest category description of your product you may then go to the right-hand side and select details. There you will access the attributes, the attributes contain a category ID which is necessary to include in your CSV file.