ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   UDF (https://www.excelbanter.com/excel-worksheet-functions/8265-udf.html)

Mark

UDF
 
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(G415,PromptPayment(),"")

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

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

thanks

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

--
Regards
Frank Kabel
Frankfurt, Germany

Mark wrote:
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(G415,PromptPayment(),"")

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

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

thanks





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

Mark wrote:
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(G415,PromptPayment(),"")

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

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

thanks



.


Arvi Laanemets

What exactly you want to do? Probably you can do it using data validation.


--
Arvi Laanemets
(When sending e-mail, use address arvil<Attarkon.ee)


wrote in message
...
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

Mark wrote:
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(G415,PromptPayment(),"")

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

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

thanks



.





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

-----Original Message-----
What exactly you want to do? Probably you can do it

using data validation.


--
Arvi Laanemets
(When sending e-mail, use address arvil<Attarkon.ee)


wrote in message
...
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

Mark wrote:
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(G415,PromptPayment(),"")

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

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

thanks


.



.


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($D215,$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 number15, cells in columns A:D on this row are
colored red.


--
Arvi Laanemets
(When sending e-mail, use address arvil<Attarkon.ee)


wrote in message
...
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

-----Original Message-----
What exactly you want to do? Probably you can do it

using data validation.


--
Arvi Laanemets
(When sending e-mail, use address arvil<Attarkon.ee)


wrote in message
...
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

Mark wrote:
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(G415,PromptPayment(),"")

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

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

thanks


.



.




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(D415,"Warning","")

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

--
Regards
Frank Kabel
Frankfurt, Germany

wrote:
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

-----Original Message-----
What exactly you want to do? Probably you can do it using data
validation.


--
Arvi Laanemets
(When sending e-mail, use address arvil<Attarkon.ee)


wrote in message
...
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

Mark wrote:
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(G415,PromptPayment(),"")

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

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

thanks


.



.




Monty

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

"Frank Kabel" wrote:

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(D415,"Warning","")

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

--
Regards
Frank Kabel
Frankfurt, Germany

wrote:
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

-----Original Message-----
What exactly you want to do? Probably you can do it using data
validation.


--
Arvi Laanemets
(When sending e-mail, use address arvil<Attarkon.ee)


wrote in message
...
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

Mark wrote:
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(G415,PromptPayment(),"")

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

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

thanks


.



.





Frank Kabel

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

--
Regards
Frank Kabel
Frankfurt, Germany

Monty wrote:
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

"Frank Kabel" wrote:

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(D415,"Warning","")

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

--
Regards
Frank Kabel
Frankfurt, Germany

wrote:
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

-----Original Message-----
What exactly you want to do? Probably you can do it using data
validation.


--
Arvi Laanemets
(When sending e-mail, use address arvil<Attarkon.ee)


wrote in message
...
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

Mark wrote:
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(G415,PromptPayment(),"")

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

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

thanks


.



.





All times are GMT +1. The time now is 11:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com