It is perfect for that, and make sure to read up on all the recent info in here on how to upgrade its processors, put in a SSD, upgrade its BIOS to the latest, and it runs great on W7Pro64 and the latest W10Pro64.
Make sure to get the second version, which you can upgrade with greater flexibility, and for the Z400 a very handy way to tell if it is the Version 2 rather than the older Version 1 is to see if it has 6 memory slots. The older version only had 4. Sellers on eBay often don't know that two versions exist..... so you want to find that out ahead of purchase if you go that way. Sometimes you can see from the pictures, and sometimes they'll show a boot screen picture showing the number of slots or that later Boot Block Date on that screen shot.