=IF(B5=0,0,VLOOKUP(B5, INDIRECT("P"&CEILING(MONTH(G3)/3,1)&"!A2:Z10000"),5,0))
I use the above formula in a sales receipt form. The formula looks at the date in cell G3 and then looks up the price of an item from 4 other worksheets depending on what the date is. Each of the lookup worksheets are labled P1,P2, P3, P4 and each worksheet represents a three month quarter of the year so P1 will contain prices that are current from January 1st to March 31st or the first quarter of the present year, P2 has pricing for April 1st - June 30th the second quarter of the year and so on. Manufacturers will change prices for products during the coarse of the year due to price increases in raw material pricing. This is usually done annually but sometimes they are forced to change prices in an off month. Right now for example there has been a price increase scheduled to take effect March 1st (30 days before the end of the first quarter) which will fall under P1 How would you suggest adding a new price worksheet and changing the formula above to access the changed prices in the new worksheet for the month of March only? Thank you for your expert advice.
I use the above formula in a sales receipt form. The formula looks at the date in cell G3 and then looks up the price of an item from 4 other worksheets depending on what the date is. Each of the lookup worksheets are labled P1,P2, P3, P4 and each worksheet represents a three month quarter of the year so P1 will contain prices that are current from January 1st to March 31st or the first quarter of the present year, P2 has pricing for April 1st - June 30th the second quarter of the year and so on. Manufacturers will change prices for products during the coarse of the year due to price increases in raw material pricing. This is usually done annually but sometimes they are forced to change prices in an off month. Right now for example there has been a price increase scheduled to take effect March 1st (30 days before the end of the first quarter) which will fall under P1 How would you suggest adding a new price worksheet and changing the formula above to access the changed prices in the new worksheet for the month of March only? Thank you for your expert advice.