ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   sum and current cell value (https://www.excelbanter.com/excel-worksheet-functions/15775-sum-current-cell-value.html)

Kim via OfficeKB.com

sum and current cell value
 
Hi There,

I have 2 columns. If A1=0, then I want 1 to be permamently added to the
value of B1.

Here's an explaination of what I'm trying to do:

A1 represents the amount of days between today's current date and the date
of which an employee was hired. If A1=0, that means the employee accrues a
vacation day. So I would need to add 1 to the current value of B1 (the
current number of vacation days an emplyee has). If A1="any number other
than 0", then nothing should be added to the value of B1.

Can this be done with a function, or does it have to be done with a macro?

Thanks for your help!

--
Message posted via http://www.officekb.com

Fred Smith

Only formulas in B1 will change the value of B1. It is not possible for
functions in one cell to change values in another cell. If B1 must contain a
number, then the only way to change it is with a macro.

--
Regards,
Fred
Please reply to newsgroup, not e-mail


"Kim via OfficeKB.com" wrote in message
...
Hi There,

I have 2 columns. If A1=0, then I want 1 to be permamently added to the
value of B1.

Here's an explaination of what I'm trying to do:

A1 represents the amount of days between today's current date and the date
of which an employee was hired. If A1=0, that means the employee accrues
a
vacation day. So I would need to add 1 to the current value of B1 (the
current number of vacation days an emplyee has). If A1="any number other
than 0", then nothing should be added to the value of B1.

Can this be done with a function, or does it have to be done with a macro?

Thanks for your help!

--
Message posted via http://www.officekb.com





All times are GMT +1. The time now is 09:25 PM.

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