ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel and Visual Basic (https://www.excelbanter.com/excel-worksheet-functions/270963-excel-visual-basic.html)

Deb[_5_]

Excel and Visual Basic
 
I was wondering if its possilbe to insert a action using visual basic
if a condition is not meet.

Column B4 (Degree)
1. Doctor of Business Administration
2. Master of Arts

Column C4 (Major)
1. Business Administration
2. Master of Arts

I would like to see Column C4 (Major) to read
1.
2. Master of Arts.

I would like to restirct the end user from entering anything in Column
C4 if Degree is equal to Doctor of Business Administration.

Thank you for your assistance

Don Guillett[_2_]

Excel and Visual Basic
 
On Dec 7, 1:00*pm, Deb wrote:
I was wondering if its possilbe to insert a action using visual basic
if a condition is not meet.

Column B4 (Degree)
1. Doctor of Business Administration
2. Master of Arts

Column C4 (Major)
1. Business Administration
2. Master of Arts

I would like to see *Column C4 (Major) to read
1.
2. Master of Arts.

I would like to restirct the end user from entering anything in Column
C4 if Degree is equal to Doctor of Business Administration.

Thank you for your assistance


Hard to figure exactly what you want.

Send your file with a complete explanation and before/after examples
to dguillett1 @gmail.com

Don Guillett[_2_]

Excel and Visual Basic
 
On Dec 7, 1:45*pm, Don Guillett wrote:
On Dec 7, 1:00*pm, Deb wrote:









I was wondering if its possilbe to insert a action using visual basic
if a condition is not meet.


Column B4 (Degree)
1. Doctor of Business Administration
2. Master of Arts


Column C4 (Major)
1. Business Administration
2. Master of Arts


I would like to see *Column C4 (Major) to read
1.
2. Master of Arts.


I would like to restirct the end user from entering anything in Column
C4 if Degree is equal to Doctor of Business Administration.


Thank you for your assistance


Hard to figure exactly *what you want.

Send your file with a complete explanation and before/after examples
to dguillett1 * * *


Private Sub Worksheet_Change(ByVal Target As Range)If Target.Count 1
Or Target.Column < 4 Then Exit SubIf Target.Offset(, -1) = "Doctor of
Business Administration" Then Target = ""
End Sub


All times are GMT +1. The time now is 09:57 PM.

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