Link to home
Start Free TrialLog in
Avatar of Dokat
Dokat

asked on

Populate data based on a criteria

Hi,

Below is the table i am working with. i 'd like to populate data in cell c1, c2, c3, c4 based on a criteria. For example: If the criteria is 4 i want cells C1,C2,C3,C4 to display 70,80,90,100 respectively and not show anything in c5,c6.... if the criteria is 5 i want cells c1,c2,c3,c4,c5 to display, 60,70,80,90,100 and so on.

Is there a formula that can generate this result? Thanks

Column A Column B
Date             Sales
1/2/2016     11
1/9/2016     23
1/16/2016   304
1/23/2016   40
1/30/2016   50
2/7/2016    60
2/14/2016   70
2/21/2016   80
2/28/2016   90
3/7/2016    100
ASKER CERTIFIED SOLUTION
Avatar of Wayne Taylor (webtubbs)
Wayne Taylor (webtubbs)
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dokat
Dokat

ASKER

Thank you Wayne! it worked i just had to add -1 to the formula

IF(ISBLANK(INDEX($B$2:$B$11, COUNTA($A$2:$A$11)-G$1-1+ROW())), "", INDEX($B$2:$B$11, COUNTA($A$2:$A$11)-G$1-1+ROW()))