mercredi 31 juillet 2019

Alternatives to Iferror(index(Match))

I have data set up in week format and each week there are incoming values and outgoing values like inventory changes. I have the data in two sheets and I pull them into a third sheet that has proper formatting. I need to keep the future values matched with the weeks that they are coming in but I need all values from the past to add up in one cell.

I have tried using an iferror(Index(Match)) code and it has worked very well to get the future data into the right location, however the reference dates are started with today date so there is nowhere for the past due dates to match to.

Range("F8").Select
    ActiveCell.FormulaR1C1 = _
        "=IFERROR(INDEX(-'OnHand & PartReq & Supply'!C10,MATCH(LOB!R6C,'OnHand & PartReq & Supply'!C4,0)),0)"
    Range("F9").Select
    ActiveCell.FormulaR1C1 = _
        "=IFERROR(INDEX('OnHand & PartReq & Supply'!C14,MATCH(LOB!R6C,'OnHand & PartReq & Supply'!C4,0)),0)"

Is there a way to use this code or a code like it, but to put all data that was in the past added together in the same cell.

Aucun commentaire:

Enregistrer un commentaire