+ Reply to Thread
Results 1 to 4 of 4

Help with writing a simple range programme in VBA

  1. #1
    Registered User
    Join Date
    02-06-2014
    Location
    Guildford
    MS-Off Ver
    Excel 2010
    Posts
    5

    Question Help with writing a simple range programme in VBA

    Hi all

    I'm trying to teach myself VBA and am trying to build a really simple programme which looks at a range of text data from cell A1 to cell E10, and if the text says 'fraud' then the cell will be highlighted a certain colour.
    The code I have written is a mash up from various sources on the internet and I have no idea whether it's suitable or not. I keep getting the error "End if without Block If" which I understand to mean my 'If' instruction is not correct.

    Here is my code, could someone please advise me?

    Please Login or Register  to view this content.
    Last edited by jembop; 02-06-2014 at 05:55 AM.

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: VBA help please - i'm a beginner!

    Hi jembop, welcome to the forums. However, your post does not comply with the forum rules. Please take some time to read the rules.

    You should change your thread title to something more descriptive of your problem, and use [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags around your code.
    多么想要告诉你 我好喜欢你

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: VBA help please - i'm a beginner!

    Welcome to the forum.

    We would like to help you but first take a look to forum rules and specially in rules# 1 & 3.

    Change your title, add code tags and then anyone would be able to help you.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Help with writing a simple range programme in VBA

    Amended your code with some comments.

    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. Hello from a beginner
    By bstinson in forum Hello..Introduce yourself
    Replies: 5
    Last Post: 08-11-2013, 09:57 PM
  2. Beginner!
    By coffeemints in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 02-28-2013, 07:22 PM
  3. Beginner in VBA
    By neeraj_joshi48 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2012, 06:58 AM
  4. VBA Beginner
    By tt388 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2007, 09:17 AM
  5. Beginner's help
    By jello in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-08-2005, 12:06 AM

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