I am working on a report that is using GETPIVOTDATA formulas to pull in data from a pivot table which is on a separate workbook. Here is the formula:
=GETPIVOTDATA("Tot Pub Est Hrs",'[PRISM Project Estimates_03.09.10.xls]EIT MobSys'!$A$5,"PID","184178","APP","Granite")
The problem is that I would like to copy this formula down the sheet and use information in other columns within this sheet to reference instead of stating the information. For example, instead of using ,"PID","184178" in the above example, I would use ,"PID",B3 & "". This works great for PID but when I apply the same replacement for APP (instead of "Granite") it returns an error.
The APP information is in column U on my spreadsheet. I have tried replacing "Granite" with U3 and U3 & "" and neither work.
Thanks for any help you can provide!
Last edited by NBVC; 03-10-2010 at 04:19 PM.
Are you sure that U3 doesn't contain any extra spaces, etc... and is spelled exactly the same...
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Well, I thought I had checked that but apparently there is something in the format that is causing the error which now has me stumped. I know there's something wrong with my data because when I copy the cell from the pivot data sheet that contains Granite and then paste that into cell U3, the formula containing "APP",U3 & "" works.
I've tried cleaning up the data by using TRIM and TEXT formulas. I also used these on the data in column U and the formula still won't recognize it as the same data. Any suggestions on how else to clean up the data?
What does
=Code(Left(U3))
and
=Code(Right(U3))
yield?
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
=Code(Left(U3)) yields 66
and
=Code(Right(U3)) yields 160
you have a special not printable character at the end of the text in U3.. that is code 0160
You can remove it by selecting the cell or cells, then go to Edit|Replace
Hold down the ALT key and enter 0160 (using only the numberpad of the keyboard) in the Find What Field... leave the Replace With field empty and click Replace All.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Or, if you are unable / unwilling to amend the source values you could try embedding your reference to U3 within a SUBSTITUTE call (within the GETPIVOTDATA function)
=GETPIVOTDATA("Tot Pub Est Hrs",'[PRISM Project Estimates_03.09.10.xls]EIT MobSys'!$A$5,"PID",B3&"","APP",SUBSTITUTE(U3,CHAR(160),""))
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
I was actually going to show that too... but figured it is better to clean your data than to "ignore" it....
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Agreed in principle but I think it all boils down to the context (he says, stating the obvious!)
If the corrections should prove to be a one-off exercise then I'm with you...
(IME CHAR(160) often results from web imports... if it transpires that the underlying values are "refreshed" on demand then manual corrections might not be viable and SUBSTITUTE might be a suitable alternative)
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Problem solved! Both solutions will come in handy for me going forward I'm sure. Thanks for the help!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks