Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-26-2016, 09:13 AM
NoSparks NoSparks is offline Cannot get macro button to sort with merged cells on sheet Windows 7 64bit Cannot get macro button to sort with merged cells on sheet Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Does this do what you're asking ?
It's straight from the Macro Recorder.
Code:
Sub Macro1()
'
' Macro1 Macro
'

'
    Range("B7:S45").Select
    ActiveWorkbook.Worksheets("Floodcoat Workup_Single").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Floodcoat Workup_Single").Sort.SortFields.Add Key _
        :=Range("E7:E45"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption _
        :=xlSortNormal
    With ActiveWorkbook.Worksheets("Floodcoat Workup_Single").Sort
        .SetRange Range("B7:S45")
        .Header = xlGuess
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    Range("B2:D4").Select
End Sub
Reply With Quote
 

Tags
button icon, filtering, macro



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA merging cells and counting Merged rows Snaybot Excel Programming 2 11-09-2015 03:56 AM
Cannot get macro button to sort with merged cells on sheet Merged cells - automatically expanding? Suzy Excel 1 08-26-2015 09:39 AM
Cannot get macro button to sort with merged cells on sheet Table will not allow sorting because "cells are merged". I can't find the merged cells. wendyloooo Word Tables 1 05-26-2015 01:19 PM
Accidentally merged cells? Fraser Excel 2 02-16-2014 10:15 PM
Debug for macro run through button only when sheet protected leahca Excel Programming 0 11-24-2011 04:47 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:07 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft