Formula seems to be referencing the formula and not the value of referenced cell

Lance1227

New Member
Joined
Mar 27, 2023
Messages
8
Office Version
  1. 2016
Platform
  1. Windows
I am trying to set up a yearly payroll file with 12 sheets for each pay period. Each sheet will start on the 21st and end on the 20th of the following month. I am trying to have each sheet auto populate with the dates and days of the week. I have custom formatted the fields as “dd”. A simple =A1+1, will work for most of the month, but I need it to stop when it reaches the 20th. If the previous month has less than 31 days then the last cell(s) in the row should be blank. I tried =IF(BA1<20,BA1+1,""). I also tried referencing a different cell with the date in it =IF(BA1<BX3, BA1+1). It seems that my formulas might be picking up the formula and not cell value. I tried several options to have my formula only use the value of the cell, but so far I haven’t found a solution. Any assistance would be greatly appreciated.
 

Attachments

  • Excel 1.png
    Excel 1.png
    14.1 KB · Views: 4

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Your cells have full dates in them. You are only displaying the Day value of the date because of cell formatting, but that displayed formatting doesn't change the cell date value.

Try something like this...

=IF(DAY(BA1)<20,BA1+1,"")
 
Upvote 0
I really appreciate your quick response. I had previously tried that. I works for the first cell after it reached "20", but subsequent cells have an #VALUE error
 

Attachments

  • Excel 2.JPG
    Excel 2.JPG
    56.6 KB · Views: 1
Upvote 0
It seems to work! I can't tell you how many hours I spent on this. You are an Excel god amongst us mere mortals. I really appreciate your assistance!
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,588
Members
449,089
Latest member
Motoracer88

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