Macro to change pivot field with latest value 03-01-10

This is a re-post as my questions hasn't been answered by anyone...

Hi there and thank you in advance for any help.

I have written a macro that changes (hides / shows) fields on a pivot table. 
One of these changes the field used for the page fields section of the pivot 
table. However, when i add a field to this section, it defaults to All. How 
can have this field default to the latest value in this field.

Let me explain further: I want the pivot to be shown either by date or by 
week. The macro then changes the page field section to show either the date 
or week field. If the date field is selected, I would like the macro to 
change this to the latest available date (captured on an Access database and 
pivot is updated via ODBC) and likewise for the week field.

Thank you kindly,
W


0
Utf
3/1/2010 8:49:01 PM
excel.programming 6508 articles. 2 followers. Follow

0 Replies
863 Views

Similar Articles

[PageSpeed] 52

Reply:

Similar Artilces:

Create a status designation from 5 date fields using "Not IsNull"
I am still learning, lots that I don't know, but I am trying to create a status designation from 5 date fields using "Not IsNull" and having difficulty. I am not sure if this will fuction best in query, forms... can I do this on the table??? After some research, this is what I have in a query for now and it seems to work but I don't want a number: Status: IIf(Not IsNull([cogradulate]),5,IIf(Not IsNull([verifydate]),4,IIf(Not IsNull([permCAdate]),3,IIf(Not IsNull([shorttermCAdate]),2,IIf(Not IsNull([containmentdate]),1,0))))) When I change it to a word in...

Macro warning with no macros
I have a workbook that when I try to open it I get the warning tellin me it contains macros and asking whether I want to Enable or Disabl them. I put no macros, no VB scripts, nothing at all in the workboo other than standard Excel formulas and some charts. I developed it i Excel 2002, SP-2, but have moved it back and forth between tw computers, the other which has Excel 97. Regardless of whether Enable or Disable or change the security settings so as not to get th warning, once the workbook is open even if I go t Tools-Macro-Macros... it lists no macros. How can I find out what's cau...

When changing end time in appointment crm cannot save duration
Hello all When we started running the crm with https instead of http the following error appeared: When you change the end time of an appointment, CRM cannot save the change to duration. Error message: "Microsoft CRM was unable to save the change to duration. Try changing the duration value again." Any ideas? Regards Magnus Also, the error is only surfacing in the web client. /Magnus "Magnus Olsson" wrote: > Hello all > > When we started running the crm with https instead of http the following > error appeared: When you change the end time of an app...

Smartlist Builder GoTos, Restrictions, Calc Fields
I feel very frustrated with this product. Most GoTos do not work because of field Type differences, or because the product seems to need more than just Key Fields to open a Form. Restrictions cannot be made with IF statements or Calculated Fields, and only CASE statements but Microsoft will not give me examples. Please let me know that Microsoft is working on extending this product's capabilties. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button i...

Why do legacy checkboxes freeze text fields in Word 2007?
If you use "Legacy Controls" checkboxes in Word 2007 and you have plain text or rich text fields, when you protect the document it will freeze you out of text fields after you select a checkbox. It only seems to do this with more than four or five check boxes and more than four or five text boxes. Help, anyone? Legacy fields require the document to be protected. Word 2007 content controls require it to be unprotected, thus the two are incompatible in the same document. -- <>>< ><<> ><<> <>>< ><<> <>...

Macro
Can anybody tell me how to kick off a macro automatically as file is opened? Regards ...

Allow change to Activity Views in MS CRM
a CRM Administrator should be able to customise Activity Views and change the views to reflect pecific information eg of views Signed on Users Activites Closed /Open My Open Activites My Closed Activites Should, but unfortunately in the current release, they can't. This will be addressed in CRM 2005 though. Matt Parks MVP - Microsoft CRM ---------------------------------------- ---------------------------------------- On Thu, 10 Mar 2005 21:57:03 -0800, "N.Pinto" <N.Pinto@discussions.microsoft.com> wrote: a CRM Administrator should be able to customise Activity Views...

when field contains
Hi smart people - I have a list I'm trying to wade through. What I need is the command to countif whatever street name is in the field; and I'm not looking for matches throughout the whole field, only where the street name is contained in the field. Does that make sense? Thanks! Tammy =COUNTIF(A:A,"*streetname*") -- __________________________________ HTH Bob "Tammy" <Tammy@discussions.microsoft.com> wrote in message news:93B1D0DB-5CFE-463B-87FD-D62FA264C172@microsoft.com... > Hi smart people - > > I have a list I'm trying to wade thro...

Is there a formular or format to change 1 to one
Is there a formular or format to change a number "1" into the word "one". Hi Kevin, See: http://www.xldynamic.com/source/xld.xlFAQ0004.html --- Regards, Norman "Kevin" <Kevin@discussions.microsoft.com> wrote in message news:3C099B0B-82F6-44FB-AD72-B0F726256F96@microsoft.com... > Is there a formular or format to change a number "1" into the word "one". See http://www.xldynamic.com/source/xld.xlFAQ0004.html -- HTH RP (remove nothere from the email address if mailing direct) "Kevin" <Kevin@discussions.micro...

Macro
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) Processor: intel Hi, I'm thinking of buying Mac: Office 2008, but before I do I want to check that I will be able to download Scritpsmart collection of templates without any glitches: <http://www.bbc.co.uk/writersroom/scriptsmart/faq.shtml> Does anyone know if I can do this? Regards, SP. In article <ee98ff5.-1@webcrossing.caR9absDaxw>, StregaItalia@officeformac.com wrote: > Version: 2008 > Operating System: Mac OS X 10.4 (Tiger) > Processor: intel > > Hi, > > I'm thinking of buying Mac: Of...

Attached Toolbars Macros
Excel 2003 I have a custom tool bar, this tool bar has several items, each item is pointing to a VBA code. This tool bar is attached to the worksheet. I've copied this spreadsheet to several computers. After I copied the spreadsheet I decided to rename the spreadsheet, after I renamed the spreadsheet the Toolbar Item's macros were still pointing to the old name, I reasigned each tool bar item to the current spreadsheet, saved the spreadsheet and everything was working on my computer, but when I re-copied the new spreadsheet to other computers and I clicked on the Toolbar Item...

Changing Rows to Columns
Is it possible to easily rotate a spreadsheet or part of a spreadshet, to change the data in rows to columns? Do to a sorting problem in the charts I create, it seems I have to sort the data in the spreadsheet first. Any help would be appreciated. Hi, Sure is a way. select & copy your data. then select the cell where you want to re-paste; right-click and select paste special; in the dialog box check "transpose". Ok. jeff >-----Original Message----- >Is it possible to easily rotate a spreadsheet or part of a >spreadshet, to change the data in rows to columns? D...

Run macro automatically.
How do I make a macro run automatically when a worksheet it is attached to is loaded? right click on the sheet tab>view code>left window worksheet>right window activate -- Don Guillett SalesAid Software donaldb@281.com "Excel macro" <Excel macro@discussions.microsoft.com> wrote in message news:DD7AF1E3-9263-4523-AC49-A43ABA1AB9D0@microsoft.com... > How do I make a macro run automatically when a worksheet it is attached to is > loaded? I am unable to find "activate " when I right click on worksheet. ( i assume that you are referring to the windo...

Help with macro/and or formula?
Perhaps this is a silly question, but i just can't figure out how t format this worksheet. The problem is that a lot of the cells hav numbers in them with negative signs in the back instead of in the fron (ie. 23-) and i was wondering if anyone knew of a macro/formula i coul use to quickly fix this problem for all the cells. I would b extremely grateful. Thanks -- brefed1 ----------------------------------------------------------------------- brefed15's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3557 View this thread: http://www.excelforum.com/showthre...

Protected sheets and running macros
i have a sheet with a macro ran by a normal button at the top. Howeve when i protect the worksheet where ever i click on the sheet the macr executes. Can any one offer any advice on how to stop this? Thanks Robert -- Message posted from http://www.ExcelForum.com hi, i am not able to reproduce the problem, hence i may not be able t provide a panacea for that issue. here is what i suggest. i have a sheet that has a macro that is run when a control toolbo button (that is, not a form button) is clicked. this sheet is protected based on the user logged in. what i have don is to protect t...

pivot chart add a ligne not in the pivot table
hello, I've a pivot table and the related graph and I would like to add 2 ligne who represents the minimun and maximum value before alarm. I would like to knwo how to create 2 ligne in a chart by vba Thanks You can create a normal chart, based on the pivot table, and include the additional lines in that. On Jon Peltier's site, there are instructions for creating a normal chart from pivot data: http://www.peltiertech.com/Excel/Pivots/pivotcharts.htm And for adding lines to a chart: http://www.peltiertech.com/Excel/Charts/ComboCharts.html#AddLine To create the code, you ...

change background graphic for all slides
I am working with a .potx file and I would like to change the background image. I did a search in this newsgroup, and found advice in many threads, to change the photo (which I'm able to do), and then to check the box/option that allows you to apply the change to all slides. I cannot see where I am given this choice (to apply the new photo as a background to all slides). I do want to retain all the text that is on top of the photo, just change the background. How, with PPT 2007, can I do this? Hi RIGHT click on a blank area of the slide Format Background > Picture > File...

Macro Freezes Reading Pane
I have a macro that Sends/Receives Tasks from Project Server into Outlook Tasks. Everything is working fine, except one weird thing that happens. I have the Timer set on the macro and it starts as soon as Outlook starts. The macro gets the tasks from ProjectServer every hour. As soon as the macro starts running the Reading pane freezes in the Inbox. If i stop the macro then Reading pane is back to normal. Can anyone please tell me if there is something I can do in VBA to fix this annoying issue. Thanks a lot ...

Macro to remove rows?
Hi, I receive thousands of rows of data from an extract that comes from a database. The data extract automatically generates page headers that need to be removed, and I would love to automate this process. The headers do have a pattern to them, but I'm not clever enough to figure out a good way to use that to write a macro. The first row of the header starts with hyphens ------------------------------- Then there's a variable number of rows of header data to delete followed by another row of hyphens ------------------------------- Then 2 additional rows that must be deleted. The nu...

Calling on a macro within a macro!
Hey All!! Quick Question - How do you call up a macro within a current macro? I have one big macro and I need it to jump to several other macros when it runs! Does it matter where the other macros are stored or is it better to have them all in one module? Help appreciated Thnx! Hi Mellowe, '=============>> Public Sub Main() 'Your code Call One 'your code End Sub '<<============= '=============>> Public Sub One() MsgBox "Hi from One" End Sub '<<============= > Does it matter where the other macros are stored or ...

shortcut keys to macros
Hi, Is it at all possible to assign shortcut keys to macros in Outlook? Thx, Hans ...

Change default "Show names from the:" option
Clicking the "To:" button in a new Outlook email message brings up the "Select Names" dialog box. This dialog displays the contents of contact databases such as My Outlook Address Book and Global Address List. Is there a way to change the default database selected in the "Show names from the:" line from the current Global Address List to the contacts in my Outlook Address Book? My version of Outlook connects with an Exchange server to acces mail, contacts, etc. Thanks for any suggestions, Kerry You probably meant to post your Outlook version so we coul...

Retain Field Format From Excel
I have an excel file that I'm importing to Access. This field consists of "time"...hours, minutes, seconds. The format in excel is set to "Custom" - [h]:mm:ss. The data elements look like 150:27:50, 2:30:25, etc... The time stays the same for some records but others change. For example...150:27:50 becomes 6:27:50 AM when imported. If someone can help me figure a way to retain the format for all records I would greatly appreciate it. Thank You, Lisa W. 150 divided by 24 = 6.25 or 6 and 1/4 days which is displayed a 6 AM. You need to use a ...

Trend Line constants as Excel Cell Values
I want to put the constants of a 2 degree polynomial trend line into Excel Cells. Are there formula's to do this? Equation is Y = Ax(2) + Bx + C. I want the value of A,B and C in seperate cells. Can anyone suggest how this can be done? Thanks -- Ken Hi Ken, Supposing your x-range is in A2:A10, and y-range in B2:B10, select a 3-column x 1-row area and enter the following formula and confirm with CTRL-SHIFT-ENTER. =LINEST(B2:B10,A2:A10^{0,1,2},0,) Regards, B. R. Ramachandran "Ken" wrote: > I want to put the constants of a 2 degree polynomial trend line into Excel &g...

Impossible to change Messenger picture in Windows Live
I have a very annoying problem with the Messenger picture: An old picture (which I no longer want to use) from Windows Live Messenger is still showing up if my contacts click on my Windows Live name in their contact list. This old picture is also the one which shows up if a contact clicks in my name in Messenger when I am not logged in. Whne I am logged in my normal picture is displayed in Messenger. I have tried in vain to change this by adjusting the settings in my Windows Live profile, but it does not seem to work. I really need help! I should add that this old pictu...