ADD a value to only one of two cells in the same row, but not both

Eric Carolus

Board Regular
Joined
Sep 17, 2012
Messages
128
Office Version
  1. 2016
Platform
  1. Windows
Hi Folks

I have two columns, called Income and Expenses.
I wish to enter a value in only one cell in the same row.

I need some kind of mechanism to prevent the user from entering values in F5 AND J5.
Either by messagebox or simply clearing the two cells.

Thank you

Eric

Chicken Braai _Saal_Kommitee.xlsm
F
7
Other_expenses

Chicken Braai _Saal_Kommitee.xlsm
DEFGHIJKLMNOP
2Income & Paid Prior ExpensesBalance after Steak Braai
3
4Income (Amount)Individual/Person/CompanyForDateExpense (Amount)R431.20Current Balance (after expenses)
51R160.00Br. A. CarolusScrap (Chairs @ Hall)24-Jun-2021R591.20
62Br. K. PaulseSalary6-Jul-2021R150.00R441.20
73 
84 
95 
106 
117 
128 
139 
1410 
1511 
1612 
1713 
1814 
1915 
2016 
2117 
2218 
Other_expenses
Cell Formulas
RangeFormula
L4L4=B4
N5N5=IF(AND(OR(F5=0,F5=""),J5>0), L4-J5,IF(F5>0,L4+F5,IF(OR(J5=0,J5=""),L4,IF(J5>0,L4-J5))))
N6:N22N6=IF(AND(OR(F6=0,F6=""),OR(J6=0,J6="")),"",IF(AND(OR(F6=0,F6=""),J6>0),N5-J6,IF(AND(OR(J6=0,J6=""),F6>0),N5+F6)))
Cells with Data Validation
CellAllowCriteria
G5:G22List=SteakNames
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
You can use data validation for that, select Custom & use
Excel Formula:
=J5=""
for F5
 
Upvote 0
Hi Fluff
Thanks for the reply.

I have done what you indicated.
Selected F5, Data validation, Custom and then typed =J5="" (in F5).
Yet both values remain in F5 and J5 (I entered a value here in J5)
Yet nothing happens.

Did I get wrong?
Please advise.

Thanks
 
Upvote 0
Should have said you need to do the same for J5 looking at F5.
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,909
Messages
6,122,189
Members
449,072
Latest member
DW Draft

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