+ Reply to Thread
Results 1 to 8 of 8

flipping contents on every wsheet

  1. #1
    Registered User
    Join Date
    09-17-2007
    Posts
    31

    Smile flipping contents on every wsheet

    Hullo people,

    I have a macro to invert the data contents of the worksheet. The excel file has 20 worksheets.
    In order to flip the data on each ws i run the macro 20 times. Further each time the macro asks to select range. The range is actually all the dat on the sheet.

    Could a VBA guru kindly tweek the macro to flip the dat on each worksheet. And kill the popup, and allow it to automatically select the complete data range (9 or 10 rows and hundreds of rows. I select the data with a Ctrl A).

    thanks friends

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: flipping contents on every wsheet

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    09-17-2007
    Posts
    31

    Re: flipping contents on every wsheet

    hello alphafrog,

    thanks a million,

    regards

  4. #4
    Registered User
    Join Date
    09-17-2007
    Posts
    31

    Re: flipping contents on every wsheet

    hello alpahfrog,

    maybe a small glitch. its not running. At all. Doesnt respond.
    could you have a look.

    regards

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: flipping contents on every wsheet

    Quote Originally Posted by biggles View Post
    hello alpahfrog,

    maybe a small glitch. its not running. At all. Doesnt respond.
    could you have a look.

    regards
    Look at what?

    Is cell A1 blank on each or any worksheet?

  6. #6
    Registered User
    Join Date
    09-17-2007
    Posts
    31

    Re: flipping contents on every wsheet

    hi alphafrog.
    yes it is. I moved the cursor to A3 where data begins and ran the macro but it didnt respond.

    regards

  7. #7
    Registered User
    Join Date
    09-17-2007
    Posts
    31

    Re: flipping contents on every wsheet

    hi alphafrog,

    the rows 1 and 2 are unimportant. Maybe a code to delete row1, row2 (except for worksheet 'Master',) could be good? something like
    Please Login or Register  to view this content.
    . But i need to add "exempt worksheet named "Master".

    thanks

    regards

  8. #8
    Registered User
    Join Date
    09-17-2007
    Posts
    31

    Re: flipping contents on every wsheet

    hello again,,

    In the macro

    Flip Macro
    'Sub FlipColumns()

    Dim ws As Worksheet
    Dim Arr As Variant, xTemp As Variant
    Dim i As Long, j As Long, k As Long

    For Each ws In Worksheets
    If ws.Range("A1").Value <> "" Then
    With ws.Range("A1").CurrentRegion
    Arr = .Formula
    For j = 1 To UBound(Arr, 2)
    k = UBound(Arr, 1)
    For i = 1 To UBound(Arr, 1) / 2
    xTemp = Arr(i, j)
    Arr(i, j) = Arr(k, j)
    Arr(k, j) = xTemp
    k = k - 1
    Next i
    Next j
    .Formula = Arr
    End With
    End If
    Next ws
    'sbVBA_To_Open_Workbook
    End Sub



    I would like the macro to operate only on a specified worksheet named "Hour" and not on all worksheets in the workbook.

    Thanks

+ 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. Replies: 2
    Last Post: 11-08-2012, 05:10 PM
  2. remove from WSheet add to another WSheet using list box?
    By waltron in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-11-2009, 10:29 AM
  3. Hyperlink to a cell in different wsheet but in same workbook
    By emanuele.musa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-17-2008, 09:03 AM
  4. Emailing a wsheet after some code completes
    By jsmity in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-30-2007, 10:59 AM
  5. retrieving database entry into another wsheet
    By alexbutterfield in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2007, 12:03 PM
  6. [SOLVED] Flipping a name
    By Duncan_J in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-18-2005, 03:06 PM
  7. RE: Flipping a name
    By Jim Thomlinson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-18-2005, 01:06 PM
  8. RE: Flipping a name
    By Trent Argante in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-18-2005, 01:06 PM

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