HELP with INDEX formula. Need IMMEDIATELY

Tungsten

New Member
Joined
Jul 25, 2019
Messages
3
I created a table to record ordering items, and have 2 columns (a Date, and a Qty) for each week of the year, per quarter, to record the Date Ordered and Quantity Ordered. I have 2 columns (at the end of each quarter) which I want the Last Date Ordered to appear in one column, and Last QTY Ordered to appear in another column.

I have the headers labeled (WK 1 Order Date, WK 1 Order QTY; WK 2 Order Date, WK 2 Order QTY... through Week 13 (for the qtr). At end of each quarter, I want the Last Date Ordered column to display only the last date entered, and the Last QTY Ordered to only display the last quantity entered.

What formula do I use in the Last Date Ordered column to skip the the Order QTY cells, and display the last date entered? (same thing for the Last Qty Ordered skipping the Date Ordered cells)?

I have used the INDEX/ COUNT functions to display the last data entered, but need it to skip ever-other cell to display only the Date/ and only the Quantity in the respective cells.

[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 2217"]
<tbody>[TR]
[TD]WK 1 ORDER DATE[/TD]
[TD]WK 1 ORDER QTY[/TD]
[TD]WK 2 ORDER DATE[/TD]
[TD]WK 2 ORDER QTY[/TD]
[TD]WK 3 ORDER DATE[/TD]
[TD]WK 3 ORDER QTY[/TD]
[TD]WK 4 ORDER DATE[/TD]
[TD]WK 4 ORDER QTY[/TD]
[TD]WK 5 ORDER DATE[/TD]
[TD]WK 5 ORDER QTY[/TD]
[TD]WK 6 ORDER DATE[/TD]
[TD]WK 6 ORDER QTY[/TD]
[TD]WK 7 ORDER DATE[/TD]
[TD]WK 7 ORDER QTY[/TD]
[TD]WK 8 ORDER DATE[/TD]
[TD]WK 8 ORDER QTY[/TD]
[TD]WK 9 ORDER DATE[/TD]
[TD]WK 9 ORDER QTY[/TD]
[TD]WK 10 ORDER DATE[/TD]
[TD]WK 10 ORDER QTY[/TD]
[TD]WK 11 ORDER DATE[/TD]
[TD]WK 11 ORDER QTY[/TD]
[TD]WK 12 ORDER DATE[/TD]
[TD]WK 12 ORDER QTY[/TD]
[TD]WK 13 ORDER DATE[/TD]
[TD]WK 13 ORDER QTY[/TD]
[TD]LAST ORDER DATE[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]LAST ORDER QTY[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 2217"]
<tbody>[TR]
[TD="class: xl72, width: 83"]07/21/19[/TD]
[TD="class: xl76, width: 83"]100[/TD]
[TD="class: xl72, width: 82"]07/28/19[/TD]
[TD="class: xl76, width: 82"]200[/TD]
[TD="class: xl72, width: 82"] [/TD]
[TD="class: xl76, width: 82"] [/TD]
[TD="class: xl72, width: 82"] [/TD]
[TD="class: xl76, width: 82"] [/TD]
[TD="class: xl72, width: 82"] [/TD]
[TD="class: xl76, width: 82"] [/TD]
[TD="class: xl72, width: 82"] [/TD]
[TD="class: xl76, width: 82"] [/TD]
[TD="class: xl72, width: 82"] [/TD]
[TD="class: xl76, width: 82"] [/TD]
[TD="class: xl72, width: 82"] [/TD]
[TD="class: xl76, width: 82"] [/TD]
[TD="class: xl72, width: 82"] [/TD]
[TD="class: xl76, width: 82"] [/TD]
[TD="class: xl72, width: 82"] [/TD]
[TD="class: xl76, width: 82"] [/TD]
[TD="class: xl72, width: 89"] [/TD]
[TD="class: xl76, width: 89"] [/TD]
[TD="class: xl72, width: 82"] [/TD]
[TD="class: xl76, width: 82"] [/TD]
[TD="class: xl72, width: 82"] [/TD]
[TD="class: xl76, width: 82"] [/TD]
[TD="class: xl75, width: 69"]4/9[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 47"]
<tbody>[TR]
[TD="class: xl71, width: 47"]200[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
THIS Is the formula I'm using in the Last Order Date cell: =IFERROR(INDEX(Order[@[WK 1 ORDER DATE]:[WK 13 ORDER QTY]],(COLUMNS(G4:G4)-1)*2,COUNT(Order[@[WK 1 ORDER DATE]:[WK 13 ORDER QTY]])),"")
 
Upvote 0
Welcome to the MrExcel board!

Firstly, in relation to the urgency of the title of your thread, I suggest that you have a look at the Forum Use Guidelines, particularly 5g and 5h in section A. :)

You could try these.
Last order date
=LOOKUP(9.99E+307,Order[@[WK 1 ORDER QTY]:[WK 13 ORDER QTY]],Order[@[WK 1 ORDER DATE]:[WK 13 ORDER DATE]])

Last order quantity
=LOOKUP(9.99E+307,Order[@[WK 1 ORDER QTY]:[WK 13 ORDER QTY]])
 
Last edited:
Upvote 0
It works. The formulas still read all the data entered (when the QTY isn't entered, the Date is is misread - and the same with the quantity); when both the date and quantity is entered, then both columns display correctly.

Thank you for the assistance (and for the reminder of forum guidelines). :-)
 
Upvote 0
It works.
Good news. :)


(when the QTY isn't entered, the Date is is misread - and the same with the quantity);
If you want to avoid that, try these versions instead.

Date
=IF([@[LAST ORDER QTY]]="","",LOOKUP(9.99E+307,Order[@[WK 1 ORDER QTY]:[WK 13 ORDER QTY]],Order[@[WK 1 ORDER DATE]:[WK 13 ORDER DATE]]))

QTY
=IF(MOD(COUNT(Order[@[WK 1 ORDER DATE]:[WK 13 ORDER QTY]]),2)=0,LOOKUP(9.99E+307,Order[@[WK 1 ORDER QTY]:[WK 13 ORDER QTY]]),"")
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

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