Move up the queue when modified

electronictokwa

Board Regular
Joined
Oct 25, 2011
Messages
122
Hi guys! I hope you can help me out :)

I have a table below with test names and modifiers (yes or no). What I need is for the bottom name to go up the queue every time it is modified by entering a value in cell next to it. It is even possible? Any ideas?

<style type="text/css">
table.tableizer-table {border: 1px solid #CCC; font-family: Arial, Helvetica, sans-serif; font-size: 12px;} .tableizer-table td {padding: 4px; margin: 3px; border: 1px solid #ccc;}
.tableizer-table th {background-color: #104E8B; color: #FFF; font-weight: bold;}
</style>


[TABLE="class: tableizer-table"]
<tbody>[TR="class: tableizer-firstrow"]
[TH]Name[/TH]
[TH]Modified (Y/N)[/TH]
[/TR]
[TR]
[TD]Test 1[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Test 2[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Test 3[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Test 4[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Test 5[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
I missed a few information. The bottom name will go up the queue when the cell next to it is modified, and the remaining names will move down the queue; all the listed names will go into rotation. Am I making any sense hehe. Thanks in advance!
 
Upvote 0
Assuming your table in A1:B6, maybe...

Right-click in the sheet tab, pick View Code
Paste the code below in the right panel

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim vRng As Variant
    
    If Target.Count > 1 Then Exit Sub
    If Not Intersect(Target, Range("B6")) Is Nothing Then
        Application.EnableEvents = False
        vRng = Range("A2:B5").Value
        Range("A2:B2").Value = Range("A6:B6").Value
        Range("A3:B6").Value = vRng
        Application.EnableEvents = True
    End If
    
End Sub

M.
 
Upvote 0
Assuming your table in A1:B6, maybe...

Right-click in the sheet tab, pick View Code
Paste the code below in the right panel

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim vRng As Variant
    
    If Target.Count > 1 Then Exit Sub
    If Not Intersect(Target, Range("B6")) Is Nothing Then
        Application.EnableEvents = False
        vRng = Range("A2:B5").Value
        Range("A2:B2").Value = Range("A6:B6").Value
        Range("A3:B6").Value = vRng
        Application.EnableEvents = True
    End If
    
End Sub

M.

Wow! It worked! Thank you so much! I'll definitely come back if I have more questions :)
 
Upvote 0
Got a few more questions :)

Is it possible for multiple user to access and edit this file? Lastly, is it possible for the table to grab the user's NT username or ID to be logged in the cell to the right of the field every time he/she modifies the bottom name? Thanks again!
 
Upvote 0
Hi,

1. Take a look at
Use a shared workbook to collaborate - Excel - Office.com

2. Maybe...

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim vRng As Variant
    
    If Target.Count > 1 Then Exit Sub
    If Not Intersect(Target, Range("B6")) Is Nothing Then
        Application.EnableEvents = False
        vRng = Range("A2:C5").Value
        Range("A2:C2").Value = Range("A6:C6").Value
        Range("A3:C6").Value = vRng
        Range("C6").Value = Environ("Username") & " at " & Now
        Application.EnableEvents = True
    End If
    
End Sub

M.
 
Upvote 0
Correction

2.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim vRng As Variant
    
    If Target.Count > 1 Then Exit Sub
    If Not Intersect(Target, Range("B6")) Is Nothing Then
        Application.EnableEvents = False
        vRng = Range("A2:C5").Value
        Range("C6").Value = Environ("Username") & " at " & Now
        Range("A2:C2").Value = Range("A6:C6").Value
        Range("A3:C6").Value = vRng
        Application.EnableEvents = True
    End If
    
End Sub

M.
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,885
Members
452,364
Latest member
springate

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