There are many ways to do this but first you need to create a table for tax-logic as excel can not read from string like "$39,540 for the first $2,947,000, then 2% over that "
thn you can apply either IF condition or lookup.
table should be look like -
col1 col2
0 0
1000 2%
3000 3%
I've uploaded a file with a similar calculation for you Ecel Dumbo - indeed it has several ways of doing it including a UDF.
The most interesting thing about this file was that I realized you must have asked a similar question earlier, as I've provided a sheet with a solution for you in it ...
xlstime's solution is in there, together with some other techniques - there are many ways to solve this problem - choose whatever one works for you.