+ Reply to Thread
Results 1 to 6 of 6

Where did I go Wrong? inserting a 5 star rating in excel VBA

  1. #1
    Registered User
    Join Date
    02-04-2013
    Location
    Durban, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    18

    Where did I go Wrong? inserting a 5 star rating in excel VBA

    Ok I have no Idea where I have gone wrong here!
    Ive got a tool list where I record tools being issued to Artisans, I am trying to add a condition field done with a 5 star rating system. which I have kind of gotten right, but when you click on the desired star to rate the tools condition, it rates the tool 10 rows below it! I cannot find where excel is getting this command from! and its left me very confused and 10 cups of coffee down!

    If anyone could spot the mistake I would GREATLY appreciate it!
    Attached Files Attached Files

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

    Re: Where did I go Wrong? inserting a 5 star rating in excel VBA

    I assume only one of the 5 stars can be yellow. If yes, try this...

    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
    02-04-2013
    Location
    Durban, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Where did I go Wrong? inserting a 5 star rating in excel VBA

    Thank you very much, I would though prefer it if all stars before the selected star were yellow to, ie. If I click star no.4, stars 1 through to 4 are yellow.

    Did you by any chance see where I went wrong in my previous code? just out of interest sakes, you know the whole give the man a fish, or teach him to fish scenario.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Where did I go Wrong? inserting a 5 star rating in excel VBA

    The reason the yellow stars are 10 rows offset if because you specify the the number of ROWS() from the start of the data and not the start of the sheet.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

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

    Re: Where did I go Wrong? inserting a 5 star rating in excel VBA

    Try this...
    Please Login or Register  to view this content.
    I think in your original code referencing
    Range("F11:J4000).Row(?)

    .Row(1) would be row 11 because the 1 references the first row of the range starting at F11. You were using the target row as the row reference which offset it another 11 rows.

  6. #6
    Registered User
    Join Date
    02-04-2013
    Location
    Durban, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Where did I go Wrong? inserting a 5 star rating in excel VBA

    Ah, I am beginning to understand!
    Thank you very much Andy Pope and AlphaFrog for your inputs!

    This is the exact result I was looking for and have slightly extended my VBA knowledge somewhat, (although at present that is a very easy achievement)

    Thanks Again

+ 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. Add 5 Star Rating to cell
    By panamakevin in forum Excel General
    Replies: 9
    Last Post: 10-10-2012, 04:25 PM
  2. Excel counts withing specific date ranges (star signs)
    By beeso74 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-03-2012, 06:23 AM
  3. Excel rating system
    By atomickaos in forum Excel General
    Replies: 5
    Last Post: 08-29-2011, 07:10 AM
  4. star
    By shashi in forum Excel General
    Replies: 2
    Last Post: 04-03-2005, 12:06 PM
  5. [SOLVED] what does the star (*) indicate in an excel spreadsheet
    By tim in forum Excel General
    Replies: 2
    Last Post: 03-30-2005, 01: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