PC Review


Reply
Thread Tools Rate Thread

Click to show value in active cell

 
 
Mik
Guest
Posts: n/a
 
      30th Jan 2008
I require assistance with showing a value within the active cell.
It is intended for a internal company survey, where ratings are given
against adjacent questions.

For example, there are 5 questions, 5 possible ratings.
Columns B,C,D,E,F represent a number from 1 to 5, where B=5, C=4, D=3,
E=2 and F=1.
If Question1(Q1) deserves a 4 rating, then click on cell C1. So, cell
C1 would then show 4 in that cell.

A B C D E F
Q1. 4
Q2. 3
Q3. 5
Q4. 2
Q5. 4

The user will work down the rows from top to bottom, clicking on a
particular column to apply the appropriate rating.

Also, i want only ONE cell per row to be selected, so if user first
chose rating 3, but then wishes to change it to rating 2, i want the
rating 3 to disappear, and show only the new selected rating 2.

Can anybody help with this issue?

Thanks in advance.
 
Reply With Quote
 
 
 
 
Bernie Deitrick
Guest
Posts: n/a
 
      30th Jan 2008
Mik,

Copy the code below, right-click the sheet tab, select "View Code" and paste the code into the
window that appears.

HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Range("B:F")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Intersect(Target.EntireRow, Range("B:F")).ClearContents
Target.Value = 7 - Target.Column
Application.EnableEvents = True
End Sub


"Mik" <(E-Mail Removed)> wrote in message
news:2c82bf60-bf72-4453-a2a2-(E-Mail Removed)...
>I require assistance with showing a value within the active cell.
> It is intended for a internal company survey, where ratings are given
> against adjacent questions.
>
> For example, there are 5 questions, 5 possible ratings.
> Columns B,C,D,E,F represent a number from 1 to 5, where B=5, C=4, D=3,
> E=2 and F=1.
> If Question1(Q1) deserves a 4 rating, then click on cell C1. So, cell
> C1 would then show 4 in that cell.
>
> A B C D E F
> Q1. 4
> Q2. 3
> Q3. 5
> Q4. 2
> Q5. 4
>
> The user will work down the rows from top to bottom, clicking on a
> particular column to apply the appropriate rating.
>
> Also, i want only ONE cell per row to be selected, so if user first
> chose rating 3, but then wishes to change it to rating 2, i want the
> rating 3 to disappear, and show only the new selected rating 2.
>
> Can anybody help with this issue?
>
> Thanks in advance.



 
Reply With Quote
 
Mik
Guest
Posts: n/a
 
      30th Jan 2008
On 30 Jan, 19:38, "Bernie Deitrick" <deitbe @ consumer dot org> wrote:
> Mik,
>
> Copy the code below, right-click the sheet tab, select "View Code" and paste the code into the
> window that appears.
>
> HTH,
> Bernie
> MS Excel MVP
>
> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> If Target.Cells.Count > 1 Then Exit Sub
> If Intersect(Target, Range("B:F")) Is Nothing Then Exit Sub
> Application.EnableEvents = False
> Intersect(Target.EntireRow, Range("B:F")).ClearContents
> Target.Value = 7 - Target.Column
> Application.EnableEvents = True
> End Sub
>
> "Mik" <mhol...@safetysystemsuk.com> wrote in message
>
> news:2c82bf60-bf72-4453-a2a2-(E-Mail Removed)...
>
>
>
> >I require assistance with showing a value within the active cell.
> > It is intended for a internal company survey, where ratings are given
> > against adjacent questions.

>
> > For example, there are 5 questions, 5 possible ratings.
> > Columns B,C,D,E,F represent a number from 1 to 5, where B=5, C=4, D=3,
> > E=2 and F=1.
> > If Question1(Q1) deserves a 4 rating, then click on cell C1. So, cell
> > C1 would then show 4 in that cell.

>
> > A * * * *B *C *D *E *F
> > Q1. * * * * *4
> > Q2. * * * * * * * 3
> > Q3. * * *5
> > Q4. * * * * * * * * * 2
> > Q5. * * * * *4

>
> > The user will work down the rows from top to bottom, clicking on a
> > particular column to apply the appropriate rating.

>
> > Also, i want only ONE cell per row to be selected, so if user first
> > chose rating 3, but then wishes to change it to rating 2, i want the
> > rating 3 to disappear, and show only the new selected rating 2.

>
> > Can anybody help with this issue?

>
> > Thanks in advance.- Hide quoted text -

>
> - Show quoted text -



Bernie,
Fantastic... Thanks a lot.
Mik
 
Reply With Quote
 
Mik
Guest
Posts: n/a
 
      30th Jan 2008
On 30 Jan, 19:45, Mik <mhol...@safetysystemsuk.com> wrote:
> On 30 Jan, 19:38, "Bernie Deitrick" <deitbe @ consumer dot org> wrote:
>
>
>
>
>
> > Mik,

>
> > Copy the code below, right-click the sheet tab, select "View Code" and paste the code into the
> > window that appears.

>
> > HTH,
> > Bernie
> > MS Excel MVP

>
> > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> > If Target.Cells.Count > 1 Then Exit Sub
> > If Intersect(Target, Range("B:F")) Is Nothing Then Exit Sub
> > Application.EnableEvents = False
> > Intersect(Target.EntireRow, Range("B:F")).ClearContents
> > Target.Value = 7 - Target.Column
> > Application.EnableEvents = True
> > End Sub

>
> > "Mik" <mhol...@safetysystemsuk.com> wrote in message

>
> >news:2c82bf60-bf72-4453-a2a2-(E-Mail Removed)...

>
> > >I require assistance with showing a value within the active cell.
> > > It is intended for a internal company survey, where ratings are given
> > > against adjacent questions.

>
> > > For example, there are 5 questions, 5 possible ratings.
> > > Columns B,C,D,E,F represent a number from 1 to 5, where B=5, C=4, D=3,
> > > E=2 and F=1.
> > > If Question1(Q1) deserves a 4 rating, then click on cell C1. So, cell
> > > C1 would then show 4 in that cell.

>
> > > A * * * *B *C *D *E *F
> > > Q1. * * * * *4
> > > Q2. * * * * * * * 3
> > > Q3. * * *5
> > > Q4. * * * * * * * * * 2
> > > Q5. * * * * *4

>
> > > The user will work down the rows from top to bottom, clicking on a
> > > particular column to apply the appropriate rating.

>
> > > Also, i want only ONE cell per row to be selected, so if user first
> > > chose rating 3, but then wishes to change it to rating 2, i want the
> > > rating 3 to disappear, and show only the new selected rating 2.

>
> > > Can anybody help with this issue?

>
> > > Thanks in advance.- Hide quoted text -

>
> > - Show quoted text -

>
> Bernie,
> Fantastic... Thanks a lot.
> Mik- Hide quoted text -
>
> - Show quoted text -


Bernie,

If i wanted to extend the survey, and add seperate questions where
answers would be in columns H:L (in addition to columns B:F), how
would i calculate this?

Mik
 
Reply With Quote
 
Bernie Deitrick
Guest
Posts: n/a
 
      30th Jan 2008
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Range("B:F, H:L")) Is Nothing Then Exit Sub
Application.EnableEvents = False
If Intersect(Target, Range("B:F")) Is Nothing Then
Intersect(Target.EntireRow, Range("H:L")).ClearContents
Target.Value = 13 - Target.Column
Else
Intersect(Target.EntireRow, Range("B:F")).ClearContents
Target.Value = 7 - Target.Column
End If
Application.EnableEvents = True
End Sub


HTH,
Bernie
MS Excel MVP


"Mik" <(E-Mail Removed)> wrote in message
news:4b82637d-e00e-4b35-959d-(E-Mail Removed)...
On 30 Jan, 19:45, Mik <mhol...@safetysystemsuk.com> wrote:
> On 30 Jan, 19:38, "Bernie Deitrick" <deitbe @ consumer dot org> wrote:
>
>
>
>
>
> > Mik,

>
> > Copy the code below, right-click the sheet tab, select "View Code" and paste the code into the
> > window that appears.

>
> > HTH,
> > Bernie
> > MS Excel MVP

>
> > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> > If Target.Cells.Count > 1 Then Exit Sub
> > If Intersect(Target, Range("B:F")) Is Nothing Then Exit Sub
> > Application.EnableEvents = False
> > Intersect(Target.EntireRow, Range("B:F")).ClearContents
> > Target.Value = 7 - Target.Column
> > Application.EnableEvents = True
> > End Sub

>
> > "Mik" <mhol...@safetysystemsuk.com> wrote in message

>
> >news:2c82bf60-bf72-4453-a2a2-(E-Mail Removed)...

>
> > >I require assistance with showing a value within the active cell.
> > > It is intended for a internal company survey, where ratings are given
> > > against adjacent questions.

>
> > > For example, there are 5 questions, 5 possible ratings.
> > > Columns B,C,D,E,F represent a number from 1 to 5, where B=5, C=4, D=3,
> > > E=2 and F=1.
> > > If Question1(Q1) deserves a 4 rating, then click on cell C1. So, cell
> > > C1 would then show 4 in that cell.

>
> > > A B C D E F
> > > Q1. 4
> > > Q2. 3
> > > Q3. 5
> > > Q4. 2
> > > Q5. 4

>
> > > The user will work down the rows from top to bottom, clicking on a
> > > particular column to apply the appropriate rating.

>
> > > Also, i want only ONE cell per row to be selected, so if user first
> > > chose rating 3, but then wishes to change it to rating 2, i want the
> > > rating 3 to disappear, and show only the new selected rating 2.

>
> > > Can anybody help with this issue?

>
> > > Thanks in advance.- Hide quoted text -

>
> > - Show quoted text -

>
> Bernie,
> Fantastic... Thanks a lot.
> Mik- Hide quoted text -
>
> - Show quoted text -


Bernie,

If i wanted to extend the survey, and add seperate questions where
answers would be in columns H:L (in addition to columns B:F), how
would i calculate this?

Mik


 
Reply With Quote
 
Mik
Guest
Posts: n/a
 
      31st Jan 2008
On 30 Jan, 20:20, "Bernie Deitrick" <deitbe @ consumer dot org> wrote:
> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> If Target.Cells.Count > 1 Then Exit Sub
> If Intersect(Target, Range("B:F, H:L")) Is Nothing Then Exit Sub
> Application.EnableEvents = False
> If Intersect(Target, Range("B:F")) Is Nothing Then
> * *Intersect(Target.EntireRow, Range("H:L")).ClearContents
> * *Target.Value = 13 - Target.Column
> Else
> * *Intersect(Target.EntireRow, Range("B:F")).ClearContents
> * *Target.Value = 7 - Target.Column
> End If
> Application.EnableEvents = True
> End Sub
>
> HTH,
> Bernie
> MS Excel MVP
>
> "Mik" <mhol...@safetysystemsuk.com> wrote in message
>
> news:4b82637d-e00e-4b35-959d-(E-Mail Removed)...
> On 30 Jan, 19:45, Mik <mhol...@safetysystemsuk.com> wrote:
>
>
>
>
>
> > On 30 Jan, 19:38, "Bernie Deitrick" <deitbe @ consumer dot org> wrote:

>
> > > Mik,

>
> > > Copy the code below, right-click the sheet tab, select "View Code" andpaste the code into the
> > > window that appears.

>
> > > HTH,
> > > Bernie
> > > MS Excel MVP

>
> > > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> > > If Target.Cells.Count > 1 Then Exit Sub
> > > If Intersect(Target, Range("B:F")) Is Nothing Then Exit Sub
> > > Application.EnableEvents = False
> > > Intersect(Target.EntireRow, Range("B:F")).ClearContents
> > > Target.Value = 7 - Target.Column
> > > Application.EnableEvents = True
> > > End Sub

>
> > > "Mik" <mhol...@safetysystemsuk.com> wrote in message

>
> > >news:2c82bf60-bf72-4453-a2a2-(E-Mail Removed)....

>
> > > >I require assistance with showing a value within the active cell.
> > > > It is intended for a internal company survey, where ratings are given
> > > > against adjacent questions.

>
> > > > For example, there are 5 questions, 5 possible ratings.
> > > > Columns B,C,D,E,F represent a number from 1 to 5, where B=5, C=4, D=3,
> > > > E=2 and F=1.
> > > > If Question1(Q1) deserves a 4 rating, then click on cell C1. So, cell
> > > > C1 would then show 4 in that cell.

>
> > > > A B C D E F
> > > > Q1. 4
> > > > Q2. 3
> > > > Q3. 5
> > > > Q4. 2
> > > > Q5. 4

>
> > > > The user will work down the rows from top to bottom, clicking on a
> > > > particular column to apply the appropriate rating.

>
> > > > Also, i want only ONE cell per row to be selected, so if user first
> > > > chose rating 3, but then wishes to change it to rating 2, i want the
> > > > rating 3 to disappear, and show only the new selected rating 2.

>
> > > > Can anybody help with this issue?

>
> > > > Thanks in advance.- Hide quoted text -

>
> > > - Show quoted text -

>
> > Bernie,
> > Fantastic... Thanks a lot.
> > Mik- Hide quoted text -

>
> > - Show quoted text -

>
> Bernie,
>
> If i wanted to extend the survey, and add seperate questions where
> answers would be in columns H:L (in addition to columns B:F), how
> would i calculate this?
>
> Mik- Hide quoted text -
>
> - Show quoted text -


Bernie,

Once again, Thanks.
That's perfect.

Mik
 
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
Can I cut and paste email messages into a cell and it only show when I click on the cell? colincurious@hotmail.com Microsoft Excel Discussion 2 29th Dec 2006 11:27 AM
Mouse click on cell does not make cell active Jerry Microsoft Excel Discussion 2 1st May 2006 10:38 PM
show active cell dallas Microsoft Excel Discussion 3 1st Sep 2004 06:52 PM
click on checkbox copy to active cell Cheryl Microsoft Excel Discussion 4 26th May 2004 11:54 PM
show active cell laneman Microsoft Excel New Users 1 10th Apr 2004 07:35 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:34 AM.