HLookup.png

Hi there,

I'm having problems with a HLookup. I would like the lookup to use an if statement to decide if the HLookup is between two dates. Attached are two pivot tables the top pivot table displays purchase orders and quantities that I would like displaying in row 28. Row 32 displays the week commencing stock usage figures and row 29 is currently a running tally against row 32's usage however not taking into account incoming stock in the top pivot table. The purpose is so I can have a running tally taking into account incoming stock.

I.e. in the top pivot table I would like the figure 5184 displayed in E28, 4752 displayed in f28 and 10368 in h28.

I've attempted this as a Hlookup using =if(and but I can't get my criteria working correctly and suspect I need to make it into an array or something?

Any advice would be much appreciated.

Thanks!