4. A retail company is analysing its sales data using Excel. A sample of the sales data is shown in the screenshot below. The sales manager wants to automatically calculate the discount percentage for each transaction based on the quantity of items sold. The discount rules are stored in a lookup table (columns H and I), where different quantity ranges correspond to different discount percentages. To achieve this, the manager enters a formula in cell D2 that looks up the quantity sold in column B against the discount table in columns H and I, and then auto-fills the formula down to D8.The retail company also tracks delivery costs for each sales area. A reference table (rows 11 and 12) lists the areas and their corresponding delivery costs. To automate the calculation, the sales manager wants Excel to fetch the correct delivery cost for each transaction based on the area in column A. To achieve this, the manager enters a formula in cell E2 and then auto-fills it down to cell E8.

What is the correct syntax for the formula that should be entered in cell D7 to display the discount for the quantity sold listed in that row?