Beachcomber1224
New Member
- Joined
- May 12, 2011
- Messages
- 18
I am in the process of creating a macro and am stuck. I would greatly appreciate anyone's help. I basically want to enter in data in the first part of an excel (there are 2 parts: 1 "regular" scoring, 1 "reversed" scoring) that will then convert these raw scored into my "converted" scores. These converted scores will go underneath where I enter the raw scores.
Here's my script that converts the "regular" score to the "converted" score:
1 (C3) à 0 (C44)<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
2 (C3) à 1 (C44)<o></o>
3 (C3) à 2 (C44)<o></o>
4 (C3) à 3 (C44)<o></o>
Using this code:<o></o>
Private Sub Worksheet_SelectionChange(ByVal Target As Range)<o></o>
Select Case Sheet1.Range("C3").Value<o></o>
Case 1 To 4<o></o>
Sheet1.Range("C44").Value = Sheet1.Range("C3").Value - 1<o></o>
Case Else<o></o>
Sheet1.Range("C44").ClearContents<o></o>
End Select
End Sub
<o></o>
Question 1
Can someone please help me come up with a script for converting the "reverse" scores from the following?
1 (C4) à 3 (C45)<o></o>
2 (C4) à 2 (C45)<o></o>
3 (C4) à 1 (C45)<o></o>
4 (C4) à 0 (C45)<o></o>
<o></o>
Question 2
I am writing this code for column C, is there a way I could loop this for all columns in the spreadsheet?
Thanks!
Here's my script that converts the "regular" score to the "converted" score:
1 (C3) à 0 (C44)<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
2 (C3) à 1 (C44)<o></o>
3 (C3) à 2 (C44)<o></o>
4 (C3) à 3 (C44)<o></o>
Using this code:<o></o>
Private Sub Worksheet_SelectionChange(ByVal Target As Range)<o></o>
Select Case Sheet1.Range("C3").Value<o></o>
Case 1 To 4<o></o>
Sheet1.Range("C44").Value = Sheet1.Range("C3").Value - 1<o></o>
Case Else<o></o>
Sheet1.Range("C44").ClearContents<o></o>
End Select
End Sub
<o></o>
Question 1
Can someone please help me come up with a script for converting the "reverse" scores from the following?
1 (C4) à 3 (C45)<o></o>
2 (C4) à 2 (C45)<o></o>
3 (C4) à 1 (C45)<o></o>
4 (C4) à 0 (C45)<o></o>
<o></o>
Question 2
I am writing this code for column C, is there a way I could loop this for all columns in the spreadsheet?
Thanks!