If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Force user action when populating cell

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-08-07, 14:54
matrixskydiver matrixskydiver is offline
Registered User
 
Join Date: Dec 2007
Posts: 2
Force user action when populating cell

Hi all

I am sure there is someone out there who knows how to do what I am hoping to achieve.

I am creating a spreadsheet for the staff to enter amounts into each month. I have attached spreadsheet file for you to see.

I would like help to achieve the following:

When a user enters an amount in a cell in the columns with the months above it (i.e. Rows 7 onwards and columns C, F & I etc), I want to force the user to select either “High”, “Med”, “Low” or “Firm” from the cell to the right of the cell they are populating, before they can continue.

For the user to select the High, Low, Med & Firm drop down cells I used the Data Validation List function.

I have set the grey cells with a formula that recognises the selected text and uses it to calculate a value from the user entered figure. Here is the formula I have used:

=IF(E7="High",D7*75%)+IF(E7="Med",D7*50%)+IF(E7="L ow",D7*25%)+IF(E7="Firm",D7*100%)

I hope someone is able to help with this.

Kind regards
Attached Files
File Type: zip Forecast.zip (21.2 KB, 43 views)
Reply With Quote
  #2 (permalink)  
Old 12-08-07, 15:56
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
Howdy, and welcome to the board.

One suggestion, not directly related to your request, but to design to help you with your request. Normally (in western languages), people move from right to left, not the other way. It seems more logical to have the required cell prior to what you desire. Thus, change columns C and D and other pairs of columns).

Also, it seems that VBA code in a private module (worksheet event) would be the best approach.
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
  #3 (permalink)  
Old 12-08-07, 16:13
matrixskydiver matrixskydiver is offline
Registered User
 
Join Date: Dec 2007
Posts: 2
Hello Shades and thank you for your kind welcome.

I move from left to right in my language too, but I am working to some very specific requests here.

Any idea on how I might be able to acheive this using VBA code in a private module?
Reply With Quote
  #4 (permalink)  
Old 12-26-07, 07:48
karthic_85 karthic_85 is offline
Registered User
 
Join Date: Dec 2007
Posts: 37
put the following code inside sheet1


Dim a As String
Private Sub Worksheet_Change(ByVal Target As Range)

If IsEmpty(Cells(Target.Row, "C")) Then
Exit Sub
Else
Range("D" & Target.Row).Select
If Cells(Target.Row, "D") = "Select" Then
a = Target.Row
End If
End If
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not a = "" Then
If Cells(a, "D") = "Select" Then
MsgBox ("please select")
Range("D" & a).Select
End If
End If
End Sub


I think it would help u
__________________
Meyyappan
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On