First and foremost you need to create a lookup column in list A to list B to link the items together. However you cannot reference a lookup column in a calculated column, so that approach will not work regardless of the syntax (Which is in fact the same as in Excel).
What you CAN do is to make a workflow that copies the text from your lookup column into a new field (simple line of text field) and then reference that field in your calculation in list A. This however has it's own drawbacks as the value in the new field will NOT change if you change the value in list B. In order for that to change you would need to make a workflow in list B that updates all items in list A with the new value - but that's only supported by using the REST api, which in turn requires you use SharePoint 2013 workflows.
So to cut it short, there's not easy way to handle this natively unfortunately.