+ Reply to Thread
Results 1 to 2 of 2

Probably a very simple question, but I need help

  1. #1
    Registered User
    Join Date
    04-11-2008
    Posts
    1

    Probably a very simple question, but I need help

    Hi, everyone.

    So yeah, I have something I'm trying to do. However, I'm completely a newbie when it comes to the many features of Excel, so I'm going to ask here.

    I have a large list of rows. It's essentially a 3-line pattern that looks like this:

    (BLANK ROW)
    point value of x
    what x actually is


    I need to get this organized better than it is. Keep in mind that I'm not using any other vertical rows... just a long list of horizontal rows. So I have two basic questions:

    1. <B>Is there a way to get rid of a massive amount of horizontal rows (in this case, the blank lines) that I don't want?</b> Or am I doomed to going through and manually deleting rows that are blank? *shudder*

    2. I need to get the point value rows into its own vertical column, right next to what X actually is. Think of it as if it were a dictionary, with the term in the left row and the definition on the right. It's the same thing here that I'm trying to do; the trouble is, it's all in one vertical column. This'll look far more organized if I can fix it so that the point values are directly to the right of the item. I figure it's something easy to do, but just can't find a way to actually do it. <B>Anyone know how?</b>

    Thanks for any help!

  2. #2
    Registered User
    Join Date
    08-13-2007
    Posts
    5

    maybe this will work

    Here's a quick macro that may work for you.

    I'm assuming your data has two rows of values followed by one blank row, with this pattern repeating, and nothing in the column to the right.

    - open your spreadsheet
    - open visual basic editor by pressing <alt><F11>
    - from the menu at the top, click Insert, then Module
    - in the Module window, paste this:

    Sub Macro1()
    '
    ' Macro1 Macro
    ' Macro recorded 4/11/2008 by Peter S
    '
    ' Keyboard Shortcut: Ctrl+a
    '
    ActiveCell.Offset(1, 0).Range("A1").Select
    Selection.Cut
    ActiveCell.Offset(-1, 1).Range("A1").Select
    ActiveSheet.Paste
    ActiveCell.Offset(1, -1).Range("A1").Select
    Selection.EntireRow.Delete
    Selection.EntireRow.Delete
    ActiveCell.Select
    End Sub

    - close the visual basic editor and be sure to save changes
    - from the Excel menu, click Tools, Macros, Macros, Options then enter "a" in the box to name the shortcut to the macro, then click OK and then the X to close the window
    - click on the first data point in your spreadsheet
    - press <CTRL><a> to initiate the macro
    - you should see your description move to the column immediately to the right of your first data point and the blank row disappear
    - your cursor is now positioned to initiate the macro again
    - repeat as necessary

    Hope this helps,

    Peter

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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