Link to home
Start Free TrialLog in
Avatar of agwalsh
agwalsh

asked on

Changing a formula to reference a cell instead of a static pivot table reference

I've got this formula set up
=SUMIFS(D:D,A:A,$N17)/GETPIVOTDATA("[Measures].[Distinct Count of WeekNo 2]",$N$16,"[Range].[Employee]","[Range].[Employee].&[Dave]")

How do I reference the [Dave] part of it so that it references a cell I can copy down rather than me having to type in the name each time. Thanks
Avatar of Shums Faruk
Shums Faruk
Flag of India image

Hi,

Assuming you are referring A1 cell, change as needed, if yes then try below;
=SUMIFS(D:D,A:A,$N17)/GETPIVOTDATA("[Measures].[Distinct Count of WeekNo 2]",$N$16,"[Range].[Employee]","[Range].[Employee]"&$A$1)
Avatar of agwalsh
agwalsh

ASKER

That doesn't work. I had tried that already.  All I want to know is what do I put into the formula instead of "[Range].[Employee].&[Dave]" so that it's dynamic and refers to a cell so I can copy it down for a range of names rather than me having to change Dave to Don or John or Joan or whatever the name is.
Please post a sample workbook, let me have a look.
ASKER CERTIFIED SOLUTION
Avatar of Shums Faruk
Shums Faruk
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of agwalsh

ASKER

Ah, excellent. Thank you. One last question :-) I reproduced the formula and it worked fine. However I found I had to add the array element individually to each entry for the week number - what would be the easier way to do that?  Thanks :-)
I think my solution is bit easier than the way you were handling. :)

As you are handling individual Employees, you need to have Week No's separately as per Employees.
Avatar of agwalsh

ASKER

Don't disagree...but still do I have to enter each array formula individually? or is there a way to copy them down?
You enter just once, then drag down until you have Employee Names in Column A.
Avatar of agwalsh

ASKER

Yes, tried again and it did work. Not sure what I was doing that it didn't work but it's working now! Thank you :-)
Avatar of agwalsh

ASKER

Thrilled with this solution - really helped. Thank you so much
You're welcome! Please to help