ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how do I leave cell content unchanged if a condition is not met (https://www.excelbanter.com/excel-programming/369952-how-do-i-leave-cell-content-unchanged-if-condition-not-met.html)

darkelf26

how do I leave cell content unchanged if a condition is not met
 
I am trying to run a daily calculation that inputs figures depending on the
day of the week. I.E if its wednesday it adds figures to coloumn. If it is
not wednesday I want it to leave the coloumn alone leaving existing
information in the coloumn

Tom Ogilvy

how do I leave cell content unchanged if a condition is not met
 
Look at the weekday function.

--
Regards,
Tom Ogilvy


"darkelf26" wrote:

I am trying to run a daily calculation that inputs figures depending on the
day of the week. I.E if its wednesday it adds figures to coloumn. If it is
not wednesday I want it to leave the coloumn alone leaving existing
information in the coloumn


darkelf26

how do I leave cell content unchanged if a condition is not me
 
Thanks Tom, I am already using the weekday function to determine whether or
not to add the figures into the chart, then it copies information from a
daily created cells. My problem here is I can get it to copy the cells across
to say tuesdays coloumn, then on wednesday it flls wednesdays coloumn,
however the script that filled tuesdays is now no longer valid (its not
tuesday) therefore it fills tuesdays cells with whatever i wrote as the
cndition of false (I.e null) is there a field I can enter as false that tells
the cell to keep what it already has until the next tuesday?

if the script returned a figure of 100 on tuesday I still want that cell to
read 100 until it is replaced on the following tuesday.

"Tom Ogilvy" wrote:

Look at the weekday function.

--
Regards,
Tom Ogilvy


"darkelf26" wrote:

I am trying to run a daily calculation that inputs figures depending on the
day of the week. I.E if its wednesday it adds figures to coloumn. If it is
not wednesday I want it to leave the coloumn alone leaving existing
information in the coloumn


Tom Ogilvy

how do I leave cell content unchanged if a condition is not me
 
It sounds like your code is flawed.

Null is not a check for an empty cell or almost any other condition. Null
has very limited use in Excel as a general statement.

So, your code may not be making the correct determination and as a result is
performing the wrong action. Not being clairvoyant, however, I can only
guess.

--
Regards,
Tom Ogilvy




"darkelf26" wrote:

Thanks Tom, I am already using the weekday function to determine whether or
not to add the figures into the chart, then it copies information from a
daily created cells. My problem here is I can get it to copy the cells across
to say tuesdays coloumn, then on wednesday it flls wednesdays coloumn,
however the script that filled tuesdays is now no longer valid (its not
tuesday) therefore it fills tuesdays cells with whatever i wrote as the
cndition of false (I.e null) is there a field I can enter as false that tells
the cell to keep what it already has until the next tuesday?

if the script returned a figure of 100 on tuesday I still want that cell to
read 100 until it is replaced on the following tuesday.

"Tom Ogilvy" wrote:

Look at the weekday function.

--
Regards,
Tom Ogilvy


"darkelf26" wrote:

I am trying to run a daily calculation that inputs figures depending on the
day of the week. I.E if its wednesday it adds figures to coloumn. If it is
not wednesday I want it to leave the coloumn alone leaving existing
information in the coloumn



All times are GMT +1. The time now is 05:39 AM.

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