Let me try that again...
So I'm trying to have the user enter:
=getpivotdata(Getdata(sheet2!$a$3,b1,b2,b3,b4,b5,b6,b7,b8))
and have excel see it as
=getpivotdata(sheet2!$a$3,'contents' 'of' 'cells' 'b1-b8')
Here is the code have currently
Public Function GetData(a, b, c, d, e, f, g, h, i)
Dim...
The issue is that all of our reports are generated from a single 8 dimension pivot table and my users run into errors concatinating the cell references all the time. so instead of them entering:
=getpivotdata(sheet2!$a$3,"'"&b1&"' '"&b2&"' '"&b3&"' '"&b4&"' '"&b5&"' '"&b6&"' '"&b7&"' '"&b8&"'")...
I'm sorry I wasn't clear. I want to write a vb function that returns a cell location. Something like:
Function text(a As String)
text = "The cell you are referencing is " & a
End Function
Is there a way to use the getpivotdata excel function in a vb function? I'm trying to write a function that pulls data from a pivot table based on the function inputs.
For example, I'd like to enter this in excel:
=myfunction(sheet2!a5,b1,b2,b3)
where sheet2!a5 is a pivot table
cell b1: time...
Is there a way to return the location of a cell as text in a function?
For example, I'd like to write a function like this:
=text(sheet1!a6) and it returns something like "The cell you are referencing is sheet1!a6
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.