+ Reply to Thread
Results 1 to 3 of 3

If condition within a pivot table-Calculated field

  1. #1
    Forum Contributor
    Join Date
    08-22-2013
    Location
    columbus,oh
    MS-Off Ver
    Office 365
    Posts
    190

    If condition within a pivot table-Calculated field

    I am trying to calculate a field called "WOS" where I have the VBA code as :

    Please Login or Register  to view this content.
    .CalculatedFields.Add Name:="WOS", Formula:="IF(( " 4 WK Average"=0),1,"Inventory OH"&"/"&"4 WK Average")
    This does not compute and gives syntax error..I am not sure why.
    Please Login or Register  to view this content.
    I want it that if "Inventory OH"=0 then 0 if 4 Wk Average =0 then 1 else Inventory OH/4 Wk Average
    Also should I be putting this in the add data field section or somewhere else?

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: If condition within a pivot table-Calculated field

    It would be something like:

    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Contributor
    Join Date
    08-22-2013
    Location
    columbus,oh
    MS-Off Ver
    Office 365
    Posts
    190

    Re: If condition within a pivot table-Calculated field

    This worked !Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Referring to a Sub-Field on Calculated Field Pivot Table Column?
    By figo12 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-27-2014, 02:02 PM
  2. Calculated pivot table field using pivot table data in calculation
    By BrittleStar in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 12-10-2012, 05:35 PM
  3. Replies: 0
    Last Post: 06-26-2012, 09:06 PM
  4. Replies: 1
    Last Post: 04-12-2010, 01:01 PM
  5. Replies: 3
    Last Post: 06-06-2006, 12:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1