Populate With Criteria

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
951
Office Version
  1. 365
Hi,

I have the following table:

Book4.xlsx
ABCDEFGHIJKL
1DatePrice% DifferenceBuySellBuy CapitalBuy UnitsSell AmountProfitProfit %Profit %
25/9/199623.25%
35/10/1996243.45% 000.000.00#DIV/0!
45/13/199623.9-0.42% 000.000.00#DIV/0!
55/14/199623.6-1.26%23.62410.000.00#DIV/0!
65/15/199623.2-1.69%23.247223.20-0.40-2%
75/16/199622.6-2.59%22.669345.20-1.60-3%
85/17/199622.80.88% 69368.40-1.00-1%
95/20/199622.5-1.32%22.592467.50-1.90-3%
105/21/199622.60.44% 92490.40-1.50-2%
115/22/199622-2.65%22114588.00-3.90-4%
125/23/199622.10.45% 1145110.50-3.40-3%
135/24/199621.6-2.26%21.61366108.00-5.90-5%
145/28/199625.618.52% 25.600153.6018.1013%
155/29/199620.8-18.75%20.82110.000.00#DIV/0!
165/30/199620.5-1.44%20.541220.50-0.30-1%
175/31/199626.830.73% 26.80053.6012.3030%
Sheet2
Cell Formulas
RangeFormula
C3:C17C3=(B3/B2)-1
D3:D17D3=IF(C3 <= -1%, B3, "")
F3F3=IF(E3<>"", 0, IF(D3<>"", D3, 0))
G3G3=IF(E3<>"", 0, IF(D3<>"", 1, 0))
H3:H17H3=B3*G2
I3:I17I3=H3-F2
J3:J17J3=I3/F2
F4:F17F4=IF(E4<>"", 0, IF(F3=0, IF(D4<>"", D4, 0), F3 + IF(D4<>"", D4, 0)))
G4:G17G4=IF(E4<>"", 0, IF(G3=0, IF(D4<>"", 1, 0), G3 + IF(D4<>"", 1, 0)))


1. Column A is the date
2. Column B is the product price.
3. Column C is the daily price difference.
4. Column D indicate the days where the user buys the product with 1 unit.
5. Column F is the aggregate capital used to buy the products. It is zerorised when the indication is to sell.
6. Column G is the aggregate units of the products purchased. It is zerorised when the indication is to sell.

I am trying to find a formula for the following:

In column E, I am trying to build a formula that will only sell if the profit is equal to or more than a certain percentage indicated in cell L2. Example, in cell B14, the price went to 25.6 and the profit is 13%. As such, column E will indicate to sell. Similar scenario when the price went to 26.8 in cell B17, the profit is 30% and column E will indicate to sell. Is there a formula that could be used for column E ?Appreciate all the help.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Like this in E3, copied down?
Excel Formula:
=IFERROR(IF(J3>L$2,B3,""),"")
 
Upvote 0
Hi Peter,

Thank for your solution. That worked. Appreciate it and have a great day ahead. 🙏
 
Upvote 0
You're welcome. Glad it was what you wanted. :)
 
Upvote 0

Forum statistics

Threads
1,223,872
Messages
6,175,100
Members
452,613
Latest member
amorehouse

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top