How do I assign the previous value to a column?

Mangolili

Board Regular
Joined
Jun 21, 2011
Messages
54
The following code assign next value to a column.
How do I assign the previou value to a column? Where do I add
a -1? Please help. Thank you.


Code:
' This Sub reads the filters from "Value" sheet and store them in            ' availableFilters array and deletes the sheet "Value"
 ReadAvailableFilters
 For i = 1 To intColCount                If filterArray(i, 1) <> "" Then 
Assign new filter value                     
'loop through the distinct value array 
                    'find where filterarray = value array 
                    'assign next value to column                     
For x = 1 To UBound(availableFilters)
 If availableFilters(x) = Replace(filterArray(i, 1), "=", "") Then                             Range(currentFiltRange)
.AutoFilter field:=i, Criteria1:=availableFilters(x + 1)                        
 End If
 Next                 
End If            
Next                                        
End With    
End With          
End Sub
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
What does this mean exactly?

The following code assign next value to a column.
How do I assign the previou value to a column?

Could you post some samples and expected results?
 
Upvote 0
What I mean was when I click on a button, it will go to the next VALUE of the autofilter. I wonder what I can do to go back to the previous value of the autofilter.

But my supervisor figured it out. It's okay, thank you for replying.
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,153
Members
452,891
Latest member
JUSTOUTOFMYREACH

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