Thread: Public Function
View Single Post
  #7   Report Post  
Monty
 
Posts: n/a
Default

Hi

Sorry about all this i am just starting to learn about excel, as you can tell.
it is also the first time i have asked questions in this way.
I have copied the example workbook using your formula below and it works
like a dream thanks for that.
however can i ask you one more question.
When you hit the ok button in the message box the cell reverts back to zero,
can this be changed so the correct amount of days are shown even if they are
over 15.
Thanks once again for all your help.
Monty

"JE McGimpsey" wrote:

I made up an example workbook for you using both C1-B1 and Days360() at

ftp://ftp.mcgimpsey.com/excel/monty_demo.xls


In article ,
"Monty" wrote:

My worksheet has the following:-

In Cell B1to B100 a received invoice date is input
In Cell C1to C100 a received invoice date at cost center is input
In Cell D1to D100 the following formula is input to calculate the
number of days =DAYS360(B1,C1)

What I am trying to achieve is if the number of days
calculated is over 15 Days, staff have to issue a letter to the budget
holder to ask them to explain the lateness of the invoice.
So if I could get some sort of message box to appear this
will ensure that this is done.

I am able to run a validation and change the cell to red, however staff
still forget to issue letter.
So can anyone help me to sort this problem?

I have already tried the following but no joy, error circular ref:-


Public Function PromptPayment()
MsgBox "Please issue Prompt Payment Letter"
End Function

Then in cell D1 I input the following:-
=DAYS360(B1,C1)=IF(D115,PromptPayment(),"")

and if i just input this instead
=IF(D115,PromptPayment(),"")