Display value based on current month

Cristan

New Member
Joined
Feb 5, 2020
Messages
22
Office Version
  1. 365
Platform
  1. Windows
Hello

I am trying to display the value written in the current month, in another cell. So when its July, i want the value that is written in the table, under juli, to be displayed in another tabel below. Like this:
1628153522824.png

So that the data in July (97,00%) is displayed in the marked cell (Below "Status på mål").

What i have used for the YTD is this: =AVERAGE(OFFSET(E6;0;0;1;MATCH(C22;Tabel12[[#Headers];[Januar]:[December]];0))) ,but i dont want it to average, i only want the show the current value in the current month.
I thought i might tweak this in a way, but i cant really come up with a solution..

I hope it makes sense and that someone can help me with this!

Thanks!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi,

Your screenshot is lacking Column and row header so i'm working on the assumption cell references in your formula are correct!

The match part of your current formula :
Excel Formula:
=MATCH(C22;Tabel12[[#Headers];[Januar]:[December]];0)
is providing the number of the month in the array. In This case 7.
So your current formula evaluates into:
  1. Start at Cell E6;
  2. 0 means "go 0 rows down"
  3. 0 means "go 0 rows right"
  4. 1 means "take 1 row"
  5. the match part evaluates into 7 and means "include 7 columns"
so the formula evaluates into
Excel Formula:
=AVERAGE(E6:K6)

To get to a year to date formula, just change AVERAGE into SUM and that's done.

To only get the monthly value:
  1. start at Cell E6
  2. you're on the correct line so go 0 rows down
  3. you're in the january month so july is 6 columns to the right, the match mart in the formula evaluates to 7 so enter 7-1

This creates the next formula which will only show the monthly result:
Excel Formula:
=OFFSET(E6;0;MATCH(C22;Tabel12[[#Headers];[Januar]:[December]];0)-1))

Hope this helps.
 
Upvote 0
Solution

Forum statistics

Threads
1,215,005
Messages
6,122,661
Members
449,091
Latest member
peppernaut

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