+ Reply to Thread
Results 1 to 3 of 3

VBA code asistance with If Function to check PivotTable value

  1. #1
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    VBA code asistance with If Function to check PivotTable value

    Hi All

    I have the following code which populates my textbox with a sales value for today taken from a pivot Table. Problem is, when their is no sales for today as yet, it throws an error. How can I add an If statement to check if Today sales is "0.00" and if so, to populate TextBox with "0.00" Else populate as per normal
    Please Login or Register  to view this content.
    Something like:

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: VBA code asistance with If Function to check PivotTable value

    Not a "proper" solution (and not tested - I'm writing on a smartphone), but shall work:
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  3. #3
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: VBA code asistance with If Function to check PivotTable value

    Hey There Kaper

    Works great, thanks as always.

+ 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. VB code to add outside border to Pivottable
    By mrazexcel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2016, 09:49 PM
  2. How to check if excel file is Checked Out in SharePoing Check Out, run code, Check In
    By jrtraylor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-08-2016, 04:36 PM
  3. need asistance applying a simple formula to a formatted cell
    By dan_fash in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-04-2016, 07:55 PM
  4. [SOLVED] Check If Value Exists in PivotTable (as a PivotItem)
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-01-2014, 10:21 AM
  5. Pivottable code problem
    By Rayo K in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-25-2006, 06:40 PM
  6. Programming Comments from the inside!! Asistance Please
    By tristandelsur in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-04-2005, 11:29 AM
  7. [SOLVED] check the cell format by function or vba code
    By Joachim in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-21-2005, 03:06 PM

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