UDF

M

Mark

If i put the following info into my worksheet it comes up
with a circular reference error.

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

then in cell G4 i input the following:-
=DAYS360(E4,F4)=IF(G4>15,PromptPayment(),"")

and if i just input this instead
=IF(G4>15,PromptPayment(),"")

I still get the same error.
any suggestions welcome.
i am not an expert in this field.

thanks
 
F

Frank Kabel

Hi
you can't insert this function in G4 as you can't have both: a value and a
formula in the same cell
 
G

Guest

Any suggestions on how to resolve this.

thanks
-----Original Message-----
Hi
you can't insert this function in G4 as you can't have both: a value and a
formula in the same cell

--
Regards
Frank Kabel
Frankfurt, Germany



.
 
G

Guest

Hi

My worksheet has the following:-

In Cell B a received invoice date is input
In Cell C a received invoice date at cost center is input
In Cell D the following formula is input to calculate the
number of days =DAYS360(B4,C4)

What I am trying to achieve is if the number of days
calculated is over 15 staff have to issue a late invoice
letter.
So if I could get some sort of message to appear this
will ensure that this is done.

Thanks for your help
 
A

Arvi Laanemets

Maybe then conditional format will be enough for you!

P.e. with data starting from row 2, and possible number of filled rows
~1000, select p.e. the range A2:D1000. From Format menu select Conditional
Formatting. Select 'Formula Is' and into formula field enter
=AND($D2>15,$D2<" ")
Click on Format button, select Pattern tab, and select cell background (p.e.
red) for case the number of days exceed 15. Now, whenever in range D2:D1000
the formula returns a number>15, cells in columns A:D on this row are
colored red.
 
F

Frank Kabel

Hi
you may consider using
=C4-B4
instead unless you really want to calculate based on 360 days per year. To
show a message some solutions:
1. In E4 enter
=IF(D4>15,"Warning","")

2. Select D4
- goto 'Format - Conditional Format'
- choose 'Value is', select larger than 15 and choose your format
 
G

Guest

thanks for these suggestions
however i would still like to have a message box appear if the two date
input for goods received exceed 15 days.
can anyone help
 
F

Frank Kabel

Hi
then this would only be possible using VBA. Not possible with formulas alone
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Help 3
VBAProject 1
Public Function 9
formula in different worksheets 4
Help with Msg box 3
programming VBA 1
Module or Formula change 8
master sheet?? 2

Top