+ Reply to Thread
Results 1 to 2 of 2

changing sheets

Hybrid View

  1. #1
    Registered User
    Join Date
    06-07-2009
    Location
    london, england
    MS-Off Ver
    excel 2010
    Posts
    36

    changing sheets

    Hi, I really struggle with changing sheets with ranges. I am completely rubbish at this - if you could help, I would be really grateful.

    'This bit works
    If ActiveCell = "£ Mark-up" Then
    Set RNG = Cells(ActiveCell.Row, ActiveCell.Column)
    Range(RNG.Offset(0, 1), RNG.Offset(0, 40)).Select
    Selection.NumberFormat = "£0.0"

    Then I want to change the sheet and format 2 other range - this doesn't work
    Set RNG = Sheets("Base").RNG
    Range(RNG.Offset(-20, 1), RNG.Offset(-20, 40)).Select
    Selection.NumberFormat = "£0.0"

    Set RNG = Sheets("Year0").RNG
    Range(RNG.Offset(-20, 1), RNG.Offset(-20, 40)).Select
    Selection.NumberFormat = "£0.0"

    Thanks
    James

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983

    Re: changing sheets

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

+ 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