Formula: If condition is false don't change current cell value

Magoosball

Board Regular
Joined
Jun 4, 2017
Messages
70
Office Version
  1. 365
I am trying to create an excel sheet that keeps track of my teams progress throughout the week. I put an example of what I currently have below as well as the formulas.

[TABLE="width: 500"]
<tbody>[TR]
[TD]Name
[/TD]
[TD]Complete[/TD]
[TD]Total[/TD]
[TD]12/31/18[/TD]
[TD]1/1/19[/TD]
[TD]1/2/19[/TD]
[TD]1/3/19[/TD]
[TD]1/4/19[/TD]
[TD]1/5/19[/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[TD]9[/TD]
[TD]10
[/TD]
[TD]=if(D$1=Today(),$B2/$C2,"")[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Allie[/TD]
[TD]3[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Kim[/TD]
[TD]15[/TD]
[TD]18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Ben[/TD]
[TD]2[/TD]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][TABLE="width: 500"]
<tbody>[TR]
[TD]=if(I$1=Today(),$B5/$C5,"")
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

I'm currently pulling reports from a database and pasting them into other sheets daily. The completed and total columns are calculated via formulas pulled from these other sheets. The issue that I'm having is that my formulas are erasing previous days data. For example, by the time I get to 1/5/19 the data in columns 12/31/18 - 1/4/19 is now erased.

Is it possible to update data for today without erasing previous data? Would it be possible with a UDF? Any suggestions are appreciated. Thank you!

Thank you in advance!
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
I am trying to create an excel sheet that keeps track of my teams progress throughout the week. I put an example of what I currently have below as well as the formulas.

[TABLE="width: 500"]
<tbody>[TR]
[TD]Name
[/TD]
[TD]Complete[/TD]
[TD]Total[/TD]
[TD]12/31/18[/TD]
[TD]1/1/19[/TD]
[TD]1/2/19[/TD]
[TD]1/3/19[/TD]
[TD]1/4/19[/TD]
[TD]1/5/19[/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[TD]9[/TD]
[TD]10
[/TD]
[TD]=if(D$1=Today(),$B2/$C2,"")[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Allie[/TD]
[TD]3[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Kim[/TD]
[TD]15[/TD]
[TD]18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Ben[/TD]
[TD]2[/TD]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][TABLE="width: 500"]
<tbody>[TR]
[TD]=if(I$1=Today(),$B5/$C5,"")
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

I'm currently pulling reports from a database and pasting them into other sheets daily. The completed and total columns are calculated via formulas pulled from these other sheets. The issue that I'm having is that my formulas are erasing previous days data. For example, by the time I get to 1/5/19 the data in columns 12/31/18 - 1/4/19 is now erased.

Is it possible to update data for today without erasing previous data? Would it be possible with a UDF? Any suggestions are appreciated. Thank you!

Thank you in advance!

ok so the problem is that you have formulas active in each of these cells. So you will ALWAYS have data changing and not reflecting previous day's data. The current formula you have will continue to show values in previous days by simply changing it to

Code:
=IF(D$1<=TODAY(),$B2/$C2,"")

However, has you completed and total fields change, so will you values in active (today() and before) days. You will need to explore other options (possibly VBA) to do what I think you are trying to do.
 
Upvote 0
Solution

Forum statistics

Threads
1,224,820
Messages
6,181,157
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top