• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

sorting by row with merged cell headers

Rodger

Member
Hi all !!
I have been struggling with something that should be simple, but here goes ...
I wish to sort these columns based on the date (row 7), keeping the two columns under each intact. No matter how I try, the underlying columns do not stay with their original headers.

Any thoughts ?

Thanks for any advice you may have.

Rodger
scnshot.jpg
 
The problem is when I autosort, the formulas dont follow the columns.
The formulas referencing column K, for example, under row K, stay as formulas for K, but may now be in row H, so the data is skewed.

Alternately, would there be a code to auto hide columns with no data, but unhide once data is there? the cells in the column are populated from input in another sheet.

does that make sense?
 
The 'enter sales' tab is all of the dates of the month.
Once a date is selected (by input from the 'EnterDates' tab), it gets populated and ready to use.
I'd like to hide the unused columns. and, if later, a new date gets selected from the EnterDates sheet, the columns are back.
I know I'm newer at this, but its the only thing I am stuck on to finish this.

thanks for any help!
 

Attachments

  • Sample Worksheet.xlsm
    282.1 KB · Views: 4
You have highlighted the problem yourself. NEVER, NEVER use Merge on cells you are loading no end of trouble into your workbook
 
Rodger - okay - sample file!
I made sample of Your needs:
1) You select something from that Your EnterDates - 'dropdown'
2) You will see soon 'enter sales'-sheet
3) You'll see only those columns which has 'something' selected
4) If You'll select any other sheet then all 'enter sales'-sheet's day-columns reset

Q: What did You mean about 'sorting' something?

Note: I didn't change any formulas nor anything else ... just show/hide some columns as You wished!
 

Attachments

  • Sample Worksheet.xlsm
    284.6 KB · Views: 6
That is AMAZING. Thank you so much for the time and effort.
(''sorting something'' was an alternative to hiding the columns, which was problematic since the formulas in the cells would reference the old columns)

Is it possible to stay on the Enter Dates tab until all of the dates are entered, and then manually switch to the Enter Sales tab? This is beautiful, but reverts to the Enter Sales tab after each entry in the Enter Dates tab.

If not, no worries, this is great.

Cheers !

Rodger
 
Skip that last post about staying on the Dates tab, I figured it out.
This is perfect.
Thanks again !!!
 
Rodger - windy?
It is possible that You could 'mark' as many dates as wanted, but ...
then You should take care that You 'mark' only one month's dates!
And as I wrote, my sample just do something that You asked.
Hint, You should modify Your codes that for example 'enter sales'-sheet's
'Month and other information will update as You need'... and so on.
 
Thanks again, this is working beautifully. I just added a line to go back to the EnterDates tab after each entry.
simply fantastic, thanks so much !

Rodger
 
Back
Top