Force entry in multiple cells

ng3000

New Member
Joined
Jan 16, 2009
Messages
8
I have a spreadsheet in which has many different cells that need to be completed if another cell has data.

Examples

If the user inputs a name into A3, they must complete cells B3 thru D3. Cells B3:D3 contain different entry methods including a drop down list.

On the same sheet, if the user chooses GTD from a drop down list in cell U3, cells BA:BJ must be completed. And if they choose GCI from the drop down list in U3, they must complete cells BK:BR

Thanks for the help
 
This method still doesn't work, because some of the cells have data lists that the user must select from.

What is needed is a code that performs the following.

1. If a user puts data into any cell in column A, then the user is required to complete the corresponding cells in columns B, C and D in that same row.

2. The code needs to only prompt the user after they have progressed pass column D.

3. The code must allow the user to use various entry methods; i.e. lists, free form, etc.

I apologize if I'm not being clear. I appreciate the code you have provided me, but I am just a vba novice and do not know all of the capabilities and limitations of vba.

Thank you.
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
OK,

This snippet will move to each successive cell after data entry in the previous column:

Code:
            Select Case Target.Column
                Case 1, 2, 3
                    Target.Offset(, 1).Select
                Case 4
                    Target.Offset(1, -3).Select
            End Select
 
Upvote 0
Here's the entire code:

<font face=Tahoma><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Worksheet_Change(<SPAN style="color:#00007F">ByVal</SPAN> Target <SPAN style="color:#00007F">As</SPAN> Range)<br>    <SPAN style="color:#007F00">'   Code goes in the Worksheet specific module</SPAN><br>    <SPAN style="color:#00007F">Dim</SPAN> rng <SPAN style="color:#00007F">As</SPAN> Range<br>        <SPAN style="color:#007F00">'   Set Target Range, i.e. Range("A1, B2, C3"), or Range("A1:B3")</SPAN><br>        <SPAN style="color:#00007F">Set</SPAN> rng = Target.Parent.Range("A:D")<br>             <SPAN style="color:#007F00">'   Only look at single cell changes</SPAN><br>            <SPAN style="color:#00007F">If</SPAN> Target.Count > 1 <SPAN style="color:#00007F">Then</SPAN> <SPAN style="color:#00007F">Exit</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br>            <SPAN style="color:#007F00">'   Only look at that range</SPAN><br>            <SPAN style="color:#00007F">If</SPAN> Intersect(Target, rng) <SPAN style="color:#00007F">Is</SPAN> <SPAN style="color:#00007F">Nothing</SPAN> <SPAN style="color:#00007F">Then</SPAN> <SPAN style="color:#00007F">Exit</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br>            <SPAN style="color:#007F00">'   Action if Condition(s) are met</SPAN><br>            <SPAN style="color:#007F00">'   Do your thing here</SPAN><br>            <SPAN style="color:#00007F">Select</SPAN> <SPAN style="color:#00007F">Case</SPAN> Target.Column<br>                <SPAN style="color:#00007F">Case</SPAN> 1, 2, 3<br>                    Target.Offset(, 1).Select<br>                <SPAN style="color:#00007F">Case</SPAN> 4<br>                    Target.Offset(1, -3).Select<br>            <SPAN style="color:#00007F">End</SPAN> Select<br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>
 
Upvote 0
This code still needs to be modified and I'm having trouble figuring out what commands are needed.

The current code makes a window/box pop up for the user to complete. I don't want a window/box to pop up, I just want the cursor to move to the next required field. And the user will be forced to make an entry into that field before proceeding.
 
Upvote 0

Forum statistics

Threads
1,226,240
Messages
6,189,822
Members
453,572
Latest member
mrjohn500

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