+ Reply to Thread
Results 1 to 3 of 3

Changing Retails Based on Rank within a Group in Excel?

  1. #1
    Registered User
    Join Date
    01-26-2014
    Location
    Phoenix
    MS-Off Ver
    Excel 2007
    Posts
    11

    Changing Retails Based on Rank within a Group in Excel?

    Hey everybody!

    I've been working on a problem that is driving me insane. I basically need to create a Group based on three columns (in the example, they are columns B, C, and H).

    For Each Group (Group = Group Letter, Group #, and Zone combined) I need the adjusted retail to equal the recommended retail provided. No Group number that is less (in rank) than the number with the recommended retail can be higher than the recommended retail. Each item (group #) that is less (in rank) than the item (Group #) with the recommended retail must be lower by $10. Each item lower in rank in that group must then go down by $10.

    Example: Filters,L,Zone 510 - Group #2 is higher than the recommended #3.

    Heaters,A,Zone 512 - Group #6 is higher than recommended retail. Need it to change to $2,389.99, and then need every other item to go down by at least $10 below that (Group #5 in that group would need to change to $2,379.99). If it is already lower than it does not need to change (so Group#4 in that group would be OK).


    This is about as hard to explain as it is to do.. If any of you have any macro ideas or formulas that could help, I would really appreciate it. I know the basics of writing VBA code but I am nowhere experienced enough to formulate what I need to do in my mind.

    Thanks again in advance!Excel Drinking Problem Script Example.xls

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Changing Retails Based on Rank within a Group in Excel?

    Hi Perm,

    I liked your old title and, except for Ben, would have congratulated you (I usually have to hitchhike)
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Changing Retails Based on Rank within a Group in Excel?

    Hi Perm,

    When you get back - try this:

    Please Login or Register  to view this content.
    Directions for running the routine(s) just supplied

    Copy the code to the clipboard

    Open your Workbook

    Save your Workbook or Another Workbook designated for Macros as Macro_Enabled

    Press ALT + F11 to open the Visual Basic Editor.

    Select “Module” from the Insert menu

    Type "Option Explicit" then paste the code under it

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name

+ 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: 1
    Last Post: 02-10-2014, 10:26 PM
  2. Group Cells and Rank based on values
    By sharahoff in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-17-2012, 12:50 PM
  3. [SOLVED] Formula to round retails to specific ending numbers
    By Agent in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-24-2012, 08:25 PM
  4. Max rank by group
    By klundtasaur in forum Excel General
    Replies: 4
    Last Post: 07-01-2011, 04:00 AM
  5. Replies: 1
    Last Post: 08-15-2005, 05:05 PM

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