+ Reply to Thread
Results 1 to 3 of 3

Rearranging the contents of the worksheet based on the cell Value

  1. #1
    Registered User
    Join Date
    03-09-2017
    Location
    Monrovia
    MS-Off Ver
    2013
    Posts
    57

    Rearranging the contents of the worksheet based on the cell Value

    I am working on an excel worksheet which contains a list of books along with their genre, stocks and sold. What I have been trying to get is to arrange the books based on their name using VBA in a new sheet. And for each collection of books I would like to have a row that counts the total for the stock and sold columns.Could anyone help me in the right direction in solving it?

    Initial Worksheet:
    testing.JPG

    Final Worksheet:
    result.JPG
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Rearranging the contents of the worksheet based on the cell Value

    Hi,

    Have you considered a Pivot Table - see attached
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: Rearranging the contents of the worksheet based on the cell Value

    I'd definitely go with PivotTable. So much easier to maintain and set up.

    Just as sample here's code to rearrange data (no formatting).
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel Macro to find cell in worksheet based on contents of another cell
    By MeBeMel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-13-2017, 11:37 AM
  2. [SOLVED] Worksheet in sections and need to move ENTIRE section based on cell A contents
    By zookeepertx in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2016, 05:47 PM
  3. Rearranging words in a cell based on a list of priorities
    By zastoic in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-25-2013, 06:45 PM
  4. Creating, copying and renaming new worksheet based on specific cell contents
    By johnejo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-26-2012, 01:16 PM
  5. Add rows into a new worksheet based on contents in a cell
    By diane.alexander58 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-15-2012, 08:53 AM
  6. Replies: 0
    Last Post: 04-06-2012, 05:07 PM
  7. Rearranging cell contents
    By MikeNZ in forum Excel General
    Replies: 11
    Last Post: 08-28-2009, 07:16 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1