What formula should I use to bring 2 values under the same date?

renatamelbourne

New Member
Joined
Dec 17, 2020
Messages
3
Office Version
  1. 2019
Platform
  1. Windows
Hi everyone!

I'm trying to make a report to work, but logically V & H lookup on their own won't make it and I can't figure out a way to mak eit work.
So, every week im completing the "database tab" as follows:
1608266625542.png


Now, on my report, which i have in a different tab, I want to change the week ending date on A1 and A2, and when I do so, then the formula or Macro will bring the values for the week im after.
This way I can easily compare the 2 weeks.
To make it a bit tidier, I would like the rows with 0 values on both weeks to be hidden.

1608266691778.png


Anyone has any clue what should I use? I believe my main problem is that Amount and GST are happening on the same date, and therefore by merging that I removed the V/Hlookup option.

Thank yoU!
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hello,

Soo try this formulas:

Cell B9 - =INDEX(Sheet2!$1:$1048576,MATCH(Sheet3!$A9,Sheet2!$A:$A,0),MATCH(Sheet3!$B$1,Sheet2!$1:$1,0))
Cell C9 - =INDEX(Sheet2!$1:$1048576,MATCH(Sheet3!$A9,Sheet2!$A:$A,0),MATCH(Sheet3!$B$1,Sheet2!$1:$1,0)+1)
Cell D9 - =INDEX(Sheet2!$1:$1048576,MATCH(Sheet3!$A9,Sheet2!$A:$A,0),MATCH(Sheet3!$B$2,Sheet2!$1:$1,0))
Cell E9 - =INDEX(Sheet2!$1:$1048576,MATCH(Sheet3!$A9,Sheet2!$A:$A,0),MATCH(Sheet3!$B$2,Sheet2!$1:$1,0)+1)

Just paste the formulas on the correct cells and drag and drop down.

Ps. You have to change the Sheet name ("Sheet2") and ("Sheet3") for your sheet name's
 
Upvote 0
Hello,

Soo try this formulas:

Cell B9 - =INDEX(Sheet2!$1:$1048576,MATCH(Sheet3!$A9,Sheet2!$A:$A,0),MATCH(Sheet3!$B$1,Sheet2!$1:$1,0))
Cell C9 - =INDEX(Sheet2!$1:$1048576,MATCH(Sheet3!$A9,Sheet2!$A:$A,0),MATCH(Sheet3!$B$1,Sheet2!$1:$1,0)+1)
Cell D9 - =INDEX(Sheet2!$1:$1048576,MATCH(Sheet3!$A9,Sheet2!$A:$A,0),MATCH(Sheet3!$B$2,Sheet2!$1:$1,0))
Cell E9 - =INDEX(Sheet2!$1:$1048576,MATCH(Sheet3!$A9,Sheet2!$A:$A,0),MATCH(Sheet3!$B$2,Sheet2!$1:$1,0)+1)

Just paste the formulas on the correct cells and drag and drop down.

Ps. You have to change the Sheet name ("Sheet2") and ("Sheet3") for your sheet name's
Hi! Thank you Alfonso!

Unfortunately is not working, it shows "N/A" and im unsure how INDEX and MATCH work so I can't figure out were the problem is,

I only have 2 tabs, one is the database which is not Sheet3 and the Report on Sheet2.
 
Upvote 0
Nailed it!! I studied a bit how it works and could fix it !!! :D works beautifully! Thank you @alfonsomira
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

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