Solved

Populate data based on a  criteria

Posted on 2016-12-01
2
46 Views
Last Modified: 2017-01-17
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
0
Comment
Question by:Dokat
2 Comments
 
LVL 47

Accepted Solution

by:
Wayne Taylor (webtubbs) earned 500 total points
ID: 41909685
=IF(ISBLANK(INDEX(B:B, COUNTA(A:A)-G$1+ROW())), "", INDEX(B:B, COUNTA(A:A)-G$1+ROW()))
0
 

Author Comment

by:Dokat
ID: 41909696
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()))
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question