PC Review


Reply
Thread Tools Rate Thread

Data entry for fixed cell ranges

 
 
webels
Guest
Posts: n/a
 
      14th Oct 2009
Hi
I have an Excel worksheet with fixed data in cell ranges. Say in
C2:C9 and B2:B8 the data is fixed. If I click on any of the cells in
this range C2:C9 and I would like “Penicillin = Sensitive” entered
into cell A11 and If I click on any of the cells in this range C2:C9
and I would like “Augmentin = Sensitive” entered into cell B12. There
are a whole lot of other ranges to work with too but if someone could
steer me in a direction I would be able to work the rest out myself

Any help is much appreciated.

Thanks
Eddie
 
Reply With Quote
 
 
 
 
Per Jessen
Guest
Posts: n/a
 
      14th Oct 2009
Hi

This is event code and has to be pasted into the code sheet for you
worksheet.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("B2:B8")) Is Nothing Then
Range("A11") = "Penicilin = Sensitive"
ElseIf Not Intersect(Target, Range("C2:C8")) Is Nothing Then
Range("B12") = "Augmentine = Sensitive"
End If
End Sub

Regards,
Per

"webels" <(E-Mail Removed)> skrev i meddelelsen
news:8d5737f7-fed3-41b7-92a4-(E-Mail Removed)...
Hi
I have an Excel worksheet with fixed data in cell ranges. Say in
C2:C9 and B2:B8 the data is fixed. If I click on any of the cells in
this range C2:C9 and I would like “Penicillin = Sensitive” entered
into cell A11 and If I click on any of the cells in this range C2:C9
and I would like “Augmentin = Sensitive” entered into cell B12. There
are a whole lot of other ranges to work with too but if someone could
steer me in a direction I would be able to work the rest out myself

Any help is much appreciated.

Thanks
Eddie

 
Reply With Quote
 
webels
Guest
Posts: n/a
 
      14th Oct 2009
On Oct 14, 12:30*pm, "Per Jessen" <per.jes...@mail.dk> wrote:
> Hi
>
> This is event code and has to be pasted into the code sheet for you
> worksheet.
>
> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> If Target.Cells.Count > 1 Then Exit Sub
> If Not Intersect(Target, Range("B2:B8")) Is Nothing Then
> * * Range("A11") = "Penicilin = Sensitive"
> ElseIf Not Intersect(Target, Range("C2:C8")) Is Nothing Then
> * * Range("B12") = "Augmentine = Sensitive"
> End If
> End Sub
>
> Regards,
> Per
>
> "webels" <eid...@gmail.com> skrev i meddelelsennews:8d5737f7-fed3-41b7-92a4-(E-Mail Removed)...
> Hi
> I have an Excel worksheet with fixed data in cell ranges. *Say in
> C2:C9 and B2:B8 the data is fixed. If I click on any of the cells in
> this range C2:C9 and I would like “Penicillin = Sensitive” entered
> into cell A11 and If I click on any of the cells in this range C2:C9
> and I would like “Augmentin = Sensitive” entered into cell B12. There
> are a whole lot of other ranges to work with too but if someone could
> steer me in a direction I would be able to work the rest out myself
>
> Any help is much appreciated.
>
> Thanks
> Eddie


Thanks Per great code works perfectly, thanks Joel also for your
suggestion.
 
Reply With Quote
 
webels
Guest
Posts: n/a
 
      17th Oct 2009
On Oct 14, 2:36*pm, webels <eid...@gmail.com> wrote:
> On Oct 14, 12:30*pm, "Per Jessen" <per.jes...@mail.dk> wrote:
>
>
>
>
>
> > Hi

>
> > This is event code and has to be pasted into the code sheet for you
> > worksheet.

>
> > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> > If Target.Cells.Count > 1 Then Exit Sub
> > If Not Intersect(Target, Range("B2:B8")) Is Nothing Then
> > * * Range("A11") = "Penicilin = Sensitive"
> > ElseIf Not Intersect(Target, Range("C2:C8")) Is Nothing Then
> > * * Range("B12") = "Augmentine = Sensitive"
> > End If
> > End Sub

>
> > Regards,
> > Per

>
> > "webels" <eid...@gmail.com> skrev i meddelelsennews:8d5737f7-fed3-41b7-92a4-(E-Mail Removed)...
> > Hi
> > I have an Excel worksheet with fixed data in cell ranges. *Say in
> > C2:C9 and B2:B8 the data is fixed. If I click on any of the cells in
> > this range C2:C9 and I would like “Penicillin = Sensitive” entered
> > into cell A11 and If I click on any of the cells in this range C2:C9
> > and I would like “Augmentin = Sensitive” entered into cell B12. There
> > are a whole lot of other ranges to work with too but if someone could
> > steer me in a direction I would be able to work the rest out myself

>
> > Any help is much appreciated.

>
> > Thanks
> > Eddie

>
> Thanks Per great code works perfectly, thanks Joel also for your
> suggestion.- Hide quoted text -
>
> - Show quoted text -


Hi again
What I set up as described above by Per is working perfectly, I was
just wondering if it would be possible to add the Value in the cell
clicked to the current out to look something like this "Penicillin =
Sensitive (0.0064)". 0.0064 being the value in the cell clicked.

Thanks again
Eddie
 
Reply With Quote
 
Per Jessen
Guest
Posts: n/a
 
      17th Oct 2009
Hi Eddie

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("B2:B8")) Is Nothing Then
Range("A11") = "Penicilin = Sensitive (" & Target.Value & ")"
ElseIf Not Intersect(Target, Range("C2:C8")) Is Nothing Then
Range("B12") = "Augmentine = Sensitive (" & Target.Value & ")"
End If
End Sub

Regards,
Per


>Hi again
>What I set up as described above by Per is working perfectly, I was
>just wondering if it would be possible to add the Value in the cell
>clicked to the current out to look something like this "Penicillin =
>Sensitive (0.0064)". 0.0064 being the value in the cell clicked.
>
>Thanks again
>Eddie

 
Reply With Quote
 
webels
Guest
Posts: n/a
 
      17th Oct 2009
On Oct 17, 9:07*pm, "Per Jessen" <per.jes...@mail.dk> wrote:
> Hi Eddie
>
> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> If Target.Cells.Count > 1 Then Exit Sub
> If Not Intersect(Target, Range("B2:B8")) Is Nothing Then
> * * Range("A11") = "Penicilin = Sensitive (" & Target.Value & ")"
> ElseIf Not Intersect(Target, Range("C2:C8")) Is Nothing Then
> * * Range("B12") = "Augmentine = Sensitive (" & Target.Value & ")"
> End If
> End Sub
>
> Regards,
> Per
>
>
>
> >Hi again
> >What I set up as described above by Per is working perfectly, I was
> >just wondering if it would be possible to add the Value in the cell
> >clicked to the current out to look something like this "Penicillin =
> >Sensitive (0.0064)". 0.0064 being the value in the cell clicked.

>
> >Thanks again
> >Eddie- Hide quoted text -

>
> - Show quoted text -


Thats exactly what I need Per - thank you for your very helpful and
prompt assistance
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I force entry in multiple cell ranges in one worksheet CindyB Microsoft Excel Worksheet Functions 0 10th Jul 2008 06:08 PM
DropDown Boxes for data entry of fixed fields Wingot Microsoft C# .NET 8 11th Dec 2007 10:56 AM
Cell Entry That Locks Selected Cells From Any Data Entry. =?Utf-8?B?cm9u?= Microsoft Excel Worksheet Functions 5 16th Feb 2007 09:52 PM
Need formula for a fixed cell minus last entry on ongoing log =?Utf-8?B?TWFyaSBD?= Microsoft Excel Worksheet Functions 5 16th Jul 2005 09:52 PM
To have a 'fixed cell' be equal to the last data entered cell in a column Mathew P Bennett Microsoft Excel Misc 2 22nd Aug 2003 06:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:22 AM.