The official website for The Settlers of Catan

Question about Base Game Trade - If the robber is preventing a player from getting a resource, can that player make any trades for that resource with other players or the bank while the robber is preventing him from getting that resource?

Answer

Yes they can. The robber only prevents that hex from generating (when its number is rolled). Similarly, the other hexes of the same type will still generate that resource (even if they are the same number as the hex being blocked by the robber).