TotallyConfused
Board Regular
- Joined
- May 4, 2017
- Messages
- 247
- Office Version
- 365
- Platform
- Windows
<o>I work in a garage and I’m creating a program to record our daily sales. The first thing the user does is enter the date in the numeric form of day, month, year, (1 1 2017) which I convert to Excel’s date format, e.g. 42736 (January 1, 2017) and store in a variable called: ROW_EXCEL_DATE_V.
Then they enter data in Column B of the DataEntry sheet as shown below.
Code:
A B
11 OIL 35
12 PARTS 120
This data (column B) is automatically transferred and stored in another sheet, ‘DataEntryTotalsDB’, which resembles the sample shown below. The number 42736 (ExcDate) is coded in ‘A3’. All following numbers in ‘A’ are created by A3+1, A4+1, etc. The ‘B C D’ columns mean ‘DAY NUM’, ‘MONTH NUM’, ‘YEAR NUM’, (e.g. =YEAR(A3) which I thought I’d need when I set this up, however, since I’ve never used that data, I think I can delete these three columns. I’ve left them here for your reference in case they play a part in what I hope will be your answer to my problem.
Code:
A B C D E F
EXCDATE DNUM MNUM YNUM OIL PARTS
3 42736 1 1 2017 35 120
4 42737 2 1 2017
The formula in ‘E3’ is: =IF($A3=ROW_EXCEL_DATE_V,DataEntry!$B$11,E3) and extends down. The formula in ‘F3’ is similar except it’s: =IF($A3=ROW_EXCEL_DATE_V,DataEntry!B$12,F3) That row (row 3) contains all the sales data for that day. Tomorrow’s data will be placed in row 4 since it’s day 42737. Even though it’s now tomorrow, I still need the data that occurred yesterday, and that is the reason for the ‘E3’ and ‘F3’ part of those formulas, however, that is causing my problem. That part of the formula gives me the error message of ‘Circular References E3’. All the remaining columns have formulas similar to those shown above, so I’m getting that same error message throughout the whole sheet.
To summarize my needs:
On day, 42736 when $A3 and ROW_EXCEL_DATE_V ARE EQUAL, then the value of E3 = 35 and F3 = 120. On day 42737, when $A3 and ROW_EXCEL_DATE_V are NOT EQUAL, those cells would remain the same (E3 = 35 and F3 = 120). They will never change unless the user specifically enters that date and makes an adjustment.
My question: How can I modify the formula in E3 (and other columns) to achieve my needs, yet avoid the ‘Circular Reference’ error message? I suppose I could create a subroutine to transfer data to this sheet, but I hate to do that because this way everything is interactive. There is no chance of the user forgetting to run the subroutine to update.
I want to THANK YOU in advance for any help you may be able to offer. </o>
Then they enter data in Column B of the DataEntry sheet as shown below.
Code:
A B
11 OIL 35
12 PARTS 120
This data (column B) is automatically transferred and stored in another sheet, ‘DataEntryTotalsDB’, which resembles the sample shown below. The number 42736 (ExcDate) is coded in ‘A3’. All following numbers in ‘A’ are created by A3+1, A4+1, etc. The ‘B C D’ columns mean ‘DAY NUM’, ‘MONTH NUM’, ‘YEAR NUM’, (e.g. =YEAR(A3) which I thought I’d need when I set this up, however, since I’ve never used that data, I think I can delete these three columns. I’ve left them here for your reference in case they play a part in what I hope will be your answer to my problem.
Code:
A B C D E F
EXCDATE DNUM MNUM YNUM OIL PARTS
3 42736 1 1 2017 35 120
4 42737 2 1 2017
The formula in ‘E3’ is: =IF($A3=ROW_EXCEL_DATE_V,DataEntry!$B$11,E3) and extends down. The formula in ‘F3’ is similar except it’s: =IF($A3=ROW_EXCEL_DATE_V,DataEntry!B$12,F3) That row (row 3) contains all the sales data for that day. Tomorrow’s data will be placed in row 4 since it’s day 42737. Even though it’s now tomorrow, I still need the data that occurred yesterday, and that is the reason for the ‘E3’ and ‘F3’ part of those formulas, however, that is causing my problem. That part of the formula gives me the error message of ‘Circular References E3’. All the remaining columns have formulas similar to those shown above, so I’m getting that same error message throughout the whole sheet.
To summarize my needs:
On day, 42736 when $A3 and ROW_EXCEL_DATE_V ARE EQUAL, then the value of E3 = 35 and F3 = 120. On day 42737, when $A3 and ROW_EXCEL_DATE_V are NOT EQUAL, those cells would remain the same (E3 = 35 and F3 = 120). They will never change unless the user specifically enters that date and makes an adjustment.
My question: How can I modify the formula in E3 (and other columns) to achieve my needs, yet avoid the ‘Circular Reference’ error message? I suppose I could create a subroutine to transfer data to this sheet, but I hate to do that because this way everything is interactive. There is no chance of the user forgetting to run the subroutine to update.
I want to THANK YOU in advance for any help you may be able to offer. </o>