ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If...then formula, otherwise "entry field" (https://www.excelbanter.com/excel-programming/369923-if-then-formula-otherwise-entry-field.html)

TmARC

If...then formula, otherwise "entry field"
 
I am looking for some VBA code that can be used to control whether a cell is
a formula or an entry field. In my sheet, the user selects a name from a
drop down list and a vlookup then populates the salary cell. However, the
user can also choose "TBD" or "Seasonal" in which case I need the salary cell
to become an entry field where the user would then input the salary amount
for these special cases. Thank You

MSweetG222

If...then formula, otherwise "entry field"
 
Have you considered using data validation instead?
Contextures.com (http://www.contextures.com/xlDataVal01.html ; <<< this is
the 1st chapter of several chapters, maybe chapter 7?) has excellent
information on various type of data validations that do not require any vba
coding.

--
Thx
MSweetG222



"TmARC" wrote:

I am looking for some VBA code that can be used to control whether a cell is
a formula or an entry field. In my sheet, the user selects a name from a
drop down list and a vlookup then populates the salary cell. However, the
user can also choose "TBD" or "Seasonal" in which case I need the salary cell
to become an entry field where the user would then input the salary amount
for these special cases. Thank You



All times are GMT +1. The time now is 07:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com