Force user to fil up certain cell based on values of another?

PATSYS

Well-known Member
Joined
Mar 12, 2006
Messages
1,750
Hi all,

I have a worksshet wherein the user chooses a value from a dropdown in column V.

Column AB (of the same row) has a formula that calculates based on the value in column V.

Now I would like that it the value in column AB is either "X1" or "X2", that column AX be selected and that usr can not move to antoher cell unless this cell is filled up.

Appreciate your help.

Thanks
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi all,

I have a worksheet wherein the user chooses a value from a dropdown in column V.

Column AB (of the same row) has a formula that calculates based on the value in column V.

Now I would like that if the value in column AB is either "X1" or "X2", that column AX be automatically selected and that user can not move to another cell unless this cell (column AX of the same row) is filled up.

Appreciate your help.

Thanks

Hi all,

I have partly editted above post for few typos.

Anybody here who knows how to do above?

Rgds
 
Upvote 0
Hi,

Maybe something like this

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
 
    If Not Intersect(Target, Range("V:V")) Is Nothing Then
        If Cells(Target.Row, "AB") = "X1" Or Cells(Target.Row, "AB") = "X2" Then
            Cells(Target.Row, "AX").Select
            Do While Selection = ""
                  Selection = Application. _
                  InputBox("Enter with a value in " & Cells(Target.Row, "AX").Address(False, False) _
                  , Type:=2)
                  If Selection = False Then Selection = ""
            Loop
        End If
    End If
 
End Sub

User must enter a string (Type:=2). If you want another type adjust it.

HTH

M.
 
Last edited:
Upvote 0
Thanks Marcelo.

Would it be possible to take out the input box and instead cell AX is selected and that the user can not leave that cell (i.e. AX) until it is filled up with value?

Rgds
 
Upvote 0

Forum statistics

Threads
1,224,579
Messages
6,179,656
Members
452,934
Latest member
mm1t1

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