+ Reply to Thread
Results 1 to 8 of 8

Edit code of public function

  1. #1
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Edit code of public function

    Hello,
    I apologize for title, I don't know if its wrong.
    I have the code below
    Please Login or Register  to view this content.
    That code counts according font colors in some cells.
    Is there a way to stop counting an empty cell?
    Thanks in advance
    Nick

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: Edit code of public function

    I thought special cells would work but it does not, so I added another perameter.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Re: Edit code of public function

    Thanks my friend, it works!

  4. #4
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Re: Edit code of public function

    Do you know why formula gives me #N/A?
    Every time when I start the book I must double click in every cell that contains =Countcolor(...) and then enter to work.

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: Edit code of public function

    Where is the udf located?

  6. #6
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Re: Edit code of public function

    In a module

    *I forgot to say that this situation of #n/a is not from your extra line of code, this starts happened days ago.

    Sorry for my bad English..
    Last edited by Immortal2014; 09-10-2020 at 08:12 AM.

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Edit code of public function

    Quote Originally Posted by Immortal2014 View Post
    Do you know why formula gives me #N/A?
    Every time when I start the book I must double click in every cell that contains =Countcolor(...) and then enter to work.
    Could you please attach a sample workbook.

    Because I am not facing that #N/A error


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  8. #8
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Re: Edit code of public function

    Hi, because I had this code along with other functions in the same module, I thought about trying to put the code in a separate module. After that I have no problem. I will work with it for a few days and if anything changes I will come back for information. Thanks

+ 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. Edit JSON parser code to add function to write JSON file
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-16-2020, 09:28 PM
  2. [SOLVED] Help with Public Function VBA
    By anfdrew in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-07-2015, 01:46 AM
  3. [SOLVED] 'Public Function into Sub
    By frank35 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-05-2013, 01:27 PM
  4. #NAME Error with Function Defined with Public Function
    By Simon Austin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-23-2009, 08:46 AM
  5. Public Function
    By jmicdk in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-29-2008, 08:15 AM
  6. Using A Public Function /
    By carl in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-06-2006, 04:15 PM
  7. public function
    By tom mcdonald in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2005, 09:05 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