Spreadsheet: 677524d1589384060-sum-if-count-if-formulas-with-blank-cells-trades
Sheet: Sheet1

# | Type | Date/Time | Signal | Price | Roll Over Pips | Shares/Ctrts/Units - Profit/Loss | Net Profit - Cum Net Profit | % Profit | Run-up/Drawdown | Efficiency | Total Eff. | Comm. | Slippage
1 | Buy | 2/22/2017 08:40 | PlungerLEM | $1.7411 | $0 | 7 | ($3,325) | -0.60% | $29 | 0.94% |  | $0 | $119 |  |  |  |  | 1) I usually sort the data first based off trade order (Column A)
 | [NAME] | 2/22/2017 09:10 | [NAME] | $1.7306 |  | ($3,087) | ($3,325) |  | ($3,087) | 0.00% | -99.06% | $0 | $119 |  |  |  |  | 2) I then copy the profit and paste it on the exits below
2 | Buy | 3/8/2017 08:40 | PlungerLEM | $1.7169 | $0 | 7 | ($444) | -0.04% | $206 | 35.00% |  | $0 | $119 |  |  |  |  | (first line is the entry trade, the second line has the profit in column G)
 | [NAME] | 3/8/2017 08:50 | ElderSEM | $1.7162 |  | ($206) | ($3,769) |  | ($382) | 30.00% | -35.00% | $0 | $119
3 | [NAME] | 3/8/2017 08:50 | ElderSEM | $1.7162 | $0 | 7 | $5,642 | 1.17% | $5,880 | 61.35% |  | $0 | $119 |  |  |  |  | When the info above it pasted into excel, it has a lead space which screws everything up for me.
 | Buy to Cover | 3/8/2017 12:00 | ATRTargetSX | $1.6962 |  | $5,880 | $1,873 |  | ($3,704) | 100.00% | 61.35% | $0 | $119 |  |  |  |  | I basically need it for three columns. A (number) C (date) and G (profit)
4 | [NAME] | 3/29/2017 08:50 | ElderSEM | $1.6297 | $0 | 7 | ($5,030) | -1.00% | $617 | 11.41% |  | $0 | $119 |  |  |  |  | I have figured out the profit for column G, but the other two I haven't
 | Buy to Cover | 3/29/2017 11:00 | ATRStopSX | $1.6460 |  | ($4,792) | ($3,157) |  | ($4,792) | 0.00% | -88.59% | $0 | $119 |  |  |  |  | Column A the cell gets renamed so when you use trim, it won't work unless you select each sell to get the correct name
5 | Buy | 3/31/2017 08:50 | ElderLEM | $1.6598 | $0 | 9 | $6,007 | 1.01% | $8,165 | 96.43% |  | $0 | $153
 | [NAME] | 3/31/2017 14:30 | ATRTrailStopLX | $1.6765 |  | $6,313 | $2,850 |  | ($302) | 78.13% | 74.55% | $0 | $153
6 | [NAME] | 4/3/2017 08:50 | ElderSEM | $1.6816 | $0 | 8 | $5,507 | 1.02% | $5,779 | 73.19% |  | $0 | $136
 | Buy to Cover | 4/3/2017 14:30 | ATRTargetSX | $1.6644 |  | $5,779 | $8,357 |  | ($2,117) | 100.00% | 73.19% | $0 | $136
 | Here should be the final result after you sort them and copy the PL to the correct column
1 | Buy | 2017-02-22 08:40:00 | PlungerLEM | 1.7411 | 0 | 7 | -3325 | -0.006 | 29 | 0.0094 |  | 0 | 119
2 | Buy | 2017-03-08 08:40:00 | PlungerLEM | 1.7169 | 0 | 7 | -444 | -0.0004 | 206 | 0.35 |  | 0 | 119
3 | [NAME] | 2017-03-08 08:50:00 | ElderSEM | 1.7162 | 0 | 7 | 5642 | 0.0117 | 5880 | 0.6135 |  | 0 | 119
4 | [NAME] | 2017-03-29 08:50:00 | ElderSEM | 1.6297 | 0 | 7 | -5030 | -0.01 | 617 | 0.1141 |  | 0 | 119
5 | Buy | 2017-03-31 08:50:00 | ElderLEM | 1.6598 | 0 | 9 | 6007 | 0.0101 | 8165 | 0.9643 |  | 0 | 153
6 | [NAME] | 2017-04-03 08:50:00 | ElderSEM | 1.6816 | 0 | 8 | 5507 | 0.0102 | 5779 | 0.7319 |  | 0 | 136
7 | [NAME] | 2017-04-05 09:00:00 | ElderSEM | 1.7137 | 0 | 7 | 4348 | 0.0091 | 5615 | 0.6725 |  | 0 | 119
8 | [NAME] | 2017-04-07 09:00:00 | ElderSEM | 1.7189 | 0 | 7 | -2472 | -0.0044 | 3381 | 0.4423 |  | 0 | 119
9 | [NAME] | 2017-04-10 08:50:00 | ElderSEM | 1.7423 | 0 | 8 | -2322 | -0.0035 | 1714 | 0.4474 |  | 0 | 136
10 | [NAME] | 2017-04-11 08:50:00 | ElderSEM | 1.7487 | 0 | 8 | -709 | -0.0007 | 5040 | 0.8152 |  | 0 | 136
# | Type | Date/Time | Signal | Price | Roll Over Pips | Shares/Ctrts/Units - Profit/Loss | Net Profit - Cum Net Profit | % Profit | Run-up/Drawdown | Efficiency | Total Eff. | Comm. | Slippage
TradeStation Trades List
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | I then use my formulas to calculate five things based off the date.
 | [NAME] | 2/22/2017 09:10 | [NAME] | $1.7306 |  | ($3,087) | ($3,325) |  | ($3,087) | 0.00% | -99.06% | $0 | $119 |  |  |  |  |  | Start Date | 2017-02-22 00:00:00
 | [NAME] | 3/8/2017 08:50 | ElderSEM | $1.7162 |  | ($206) | ($3,769) |  | ($382) | 30.00% | -35.00% | $0 | $119 |  |  |  |  |  | End Date | 2017-03-29 00:00:00
 | Buy to Cover | 3/8/2017 12:00 | ATRTargetSX | $1.6962 |  | $5,880 | $1,873 |  | ($3,704) | 100.00% | 61.35% | $0 | $119 |  |  |  |  |  |  |  |  | Correct answers
 | Buy to Cover | 3/29/2017 11:00 | ATRStopSX | $1.6460 |  | ($4,792) | ($3,157) |  | ($4,792) | 0.00% | -88.59% | $0 | $119 |  |  |  |  |  | Net Profit |  |  | -2205
 | [NAME] | 3/31/2017 14:30 | ATRTrailStopLX | $1.6765 |  | $6,313 | $2,850 |  | ($302) | 78.13% | 74.55% | $0 | $153 |  |  |  |  |  | PF |  |  | 0.73
 | Buy to Cover | 4/3/2017 14:30 | ATRTargetSX | $1.6644 |  | $5,779 | $8,357 |  | ($2,117) | 100.00% | 73.19% | $0 | $136 |  |  |  |  |  | % Correct |  |  | 0.25
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Trades |  |  | 4
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Win in a row |  |  | 1
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Loser in a row |  |  | 2
 |  | When I copy the trades into excel, every cell has a blank space before the data.  I created column P and R to remove the space before
 |  | the profit and before the date.  When I copy the forumulas down for thousands of cells, it shows the #[NAME] error. If I do the
 |  | IFERROR formula, my formulas count the "empty" cells as trades or wins.  How do I get my formulas in cells U to work
 |  | without having erros in P and R? I put the correct answers in column W.
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Correct answers
 | [NAME] | 2/22/2017 09:10 | [NAME] | $1.7306 |  | ($3,087) | ($3,325) |  | ($3,087) | 0.00% | -99.06% | $0 | $119 |  |  |  |  |  | Net Profit |  |  | 9887
 | [NAME] | 3/8/2017 08:50 | ElderSEM | $1.7162 |  | ($206) | ($3,769) |  | ($382) | 30.00% | -35.00% | $0 | $119 |  |  |  |  |  | PF |  |  | 2.22
 | Buy to Cover | 3/8/2017 12:00 | ATRTargetSX | $1.6962 |  | $5,880 | $1,873 |  | ($3,704) | 100.00% | 61.35% | $0 | $119 |  |  |  |  |  | % Correct |  |  | 0.5
 | Buy to Cover | 3/29/2017 11:00 | ATRStopSX | $1.6460 |  | ($4,792) | ($3,157) |  | ($4,792) | 0.00% | -88.59% | $0 | $119 |  |  |  |  |  | Trades |  |  | 6
 | [NAME] | 3/31/2017 14:30 | ATRTrailStopLX | $1.6765 |  | $6,313 | $2,850 |  | ($302) | 78.13% | 74.55% | $0 | $153 |  |  |  |  |  | Win in a row |  |  | 2
 | Buy to Cover | 4/3/2017 14:30 | ATRTargetSX | $1.6644 |  | $5,779 | $8,357 |  | ($2,117) | 100.00% | 73.19% | $0 | $136 |  |  |  |  |  | Loser in a row |  |  | 2