+ Reply to Thread
Results 1 to 4 of 4

Maximum cell range

  1. #1
    Registered User
    Join Date
    05-14-2009
    Location
    Melbourne
    MS-Off Ver
    Excel 2003
    Posts
    1

    Maximum cell range

    Hi, I am new to writing macros in VBA. Currently I am running a macro where it will enter data into the first blank cell in column B

    Please Login or Register  to view this content.
    how can i make it so when this macro is run it will only put in the 'xxxxx' if the cell is between B2 and B19 (B2,B3,B4,B5,B6,B7......B18,B19) and if the cell is B20:B65536 (or just b20) to bring up an error message. I assume an If statement may be sufficient however I have not been able to figure this out.

    Thanks
    Last edited by royUK; 05-16-2009 at 06:00 AM. Reason: add code tags

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

    Re: Maximum cell range

    Welcome to Exceltip forum

    Please take a couple of minutes and read ALL theForum Rules then wrap your VBA code (Rule 3)
    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.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Maximum cell range

    varnsen, I have added Code tags for you. Be sure to read the Forum Rules before poting again.

    You might also finf the How To button on the blue Forum Toolbar helpful
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Maximum cell range

    This should do what you want
    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)

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