# Transpose Formula when Certain Criteria are met

##### New Member
Hi All,

Apologies if this has been asked before but I have searched and only found similar requests, nothing solving my exact issue.

I have some weekly KPI data which gets collated each month into charts. The data is entered each week and totaled using sum formulas onto a sheet. I have a chart on another sheet that I would like to transpose this data onto (the data currently has the months as column headers but the chart needs them to be as rows). My issue is that I only want to show last month and earlier and hide the data entered so far for this month.

Example:

Original data:
 Jan Feb Mar Apr 100 150 125 25

<tbody>
</tbody>

How I want to see the chart data:
 Jan 100 Feb 150 Mar 125 Apr

<tbody>
</tbody>

What I would like to do is have a transpose formula to enter the data onto the chart but only if the month is lower than today's month.

I hope this makes sense.

Gav

#### James006

##### Well-known Member
Hi,

say your data in located in range A1:D2

in cell A5, you could have : =OFFSET(\$A\$1,0,ROW()-5)

and in cell B5, you could have : =IF(MONTH("1"&A5)>=MONTH(TODAY()),"",OFFSET(\$A\$1,1,MATCH(A5,\$1:\$1,0)-1))

Hope this will help

##### New Member
Hi,

say your data in located in range A1:D2

in cell A5, you could have : =OFFSET(\$A\$1,0,ROW()-5)

and in cell B5, you could have : =IF(MONTH("1"&A5)>=MONTH(TODAY()),"",OFFSET(\$A\$1,1,MATCH(A5,\$1:\$1,0)-1))

Hope this will help
Thanks for the help but unfortunately that won't work as the data is on a different sheet to the chart and is among other data so it's not as simple as just offsetting.

#### theBardd

##### Rules violation
Use Power Query (Data>Get & Transform) , unpivot the data, and the chart the result table.

#### James006

##### Well-known Member
Thanks for the help but unfortunately that won't work as the data is on a different sheet to the chart and is among other data so it's not as simple as just offsetting.
Do not know the complexity of your workbook ...

But Offset can easily operate across sheets ...

##### New Member
This has actually helped a lot as it helped me realise I can just do a HLookup using the month headers. Thank you

1,082,250
Messages
5,364,033
Members
400,774
Latest member
Goldi paul

### This Week's Hot Topics

• populate from drop list with multiple tables
Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
• Find list of words from sheet2 in sheet1 before a comma and extract text vba
Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
• Dynamic Formula entry - VBA code sought
Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...