Excel VBA Sorting Problem
Closed
Hassan
-
27 Sep 2019 à 12:29
vcoolio Posts 1411 Registration date Thursday 24 July 2014 Status Contributor Last seen 6 September 2024 - 29 Sep 2019 à 22:02
vcoolio Posts 1411 Registration date Thursday 24 July 2014 Status Contributor Last seen 6 September 2024 - 29 Sep 2019 à 22:02
Related:
- Excel VBA Sorting Problem
- Excel vba find - Guide
- Vba excel mac - Guide
- Excel mod apk for pc - Download - Spreadsheets
- Excel vba timer - Guide
- Excel vba send email with attachment - Guide
1 response
vcoolio
Posts
1411
Registration date
Thursday 24 July 2014
Status
Contributor
Last seen
6 September 2024
262
29 Sep 2019 à 06:52
29 Sep 2019 à 06:52
Hello Hassan,
You haven't supplied the code so its a little difficult to determine what the problem is.
Please try again.
Cheerio,
vcoolio.
You haven't supplied the code so its a little difficult to determine what the problem is.
Please try again.
Cheerio,
vcoolio.
Updated on Sep 29, 2019 at 10:05 PM
29 Sep 2019 à 22:02
I'm assuming then that your "SKU" column will never be in the same place (it could be Column C or Column F or Column Z etc.) so try the code amended as follows:-
Sub Sorting() Dim acell As Range Set acell = Rows(2).Find(What:="sku", LookIn:=xlValues, LookAt:=xlWhole) ActiveSheet.Range("A2").Sort acell.Offset(1), 2, Header:=xlYes End SubI'm also assuming that your data starts in Column A, Row3.
The code above should sort your data descending.
I hope that this helps.
Cheerio,
vcoolio.