Using IF or IFS to clear range when a fixed cell value changes

JulianvO

New Member
Joined
Sep 9, 2022
Messages
34
Office Version
  1. 2021
Platform
  1. Windows
Greetings

I have an attendance register, which changes the year using a spin button.

Cell A2 contains the minimum value for the spin button, namely 2025. this increased by 1 every time the spin button is activated.

However, changing the year does not clear the range of attendance data.

I know this can be done in VBA, but I would like to do this using a formula.

I have tried =IF($A$2= $A$2+1;D4:AL10="") This does not work.

Any pointers / solutions?

Thanking you in advance

Juian
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Firstly A2 can never = A2+1, secondly a formula cannot remove data from other cells (unless the whole range is a single spill range)
 
Upvote 0
Solution

Forum statistics

Threads
1,225,750
Messages
6,186,808
Members
453,373
Latest member
Ereha

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