+ Reply to Thread
Results 1 to 3 of 3

IF formula + 1 based on previous event

  1. #1
    Registered User
    Join Date
    02-07-2016
    Location
    Barcelona. España
    MS-Off Ver
    2016
    Posts
    20

    IF formula + 1 based on previous event

    Good day, all

    So, I have what seems to be a silly issue, but nor I nor an Excel expert in the office have been able to solve it "practically". Hopefully someone here has an approach that neither of us have thought of.

    Let's say, for the purposes of this example, my worksheet consists of three columns (Condition, BonusCode VIPS and BonusCode ALL); what I'm looking for is to find a way for my bonus codes are numbered (1 on) depending on the last time that condition was met/used.

    Let's say I have three rows with the same or different condition(s), for which the bonus codes should be the same (or dif, if another condition), but I want them to differ in the suffix number. I.E., VIPSPTRETAMBMARAB1,VIPSPTRETAMBMARAB2 and VIPSPTRETAMBMARAB3.

    Notice in the example sheet these aren't necessarily one above/below the other, but rather separated by one or more row(s).

    Any thoughts?

    Thanks in advance all!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: IF formula + 1 based on previous event

    First, look up how to use VLOOKUP. I created a little VLOOKUP table which should contain all the possible things that could appear in Column A and their counterparts.

    Then for formula for BONUSCODE All is

    =VLOOKUP(A2, $J$1:$K$3,2,FALSE) &COUNTIF($A$2:$A2, A2)
    copied down
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    02-07-2016
    Location
    Barcelona. España
    MS-Off Ver
    2016
    Posts
    20

    Re: IF formula + 1 based on previous event

    Uh oh, I see what you did there! That did the trick! Thanks a lot!

+ 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. [SOLVED] How to create formula based on the previous cell values in order
    By dedark05 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-29-2016, 12:13 AM
  2. Formula based on more than 240 of previous cell values
    By dedark05 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-28-2016, 10:40 PM
  3. SUM IF FORMULA BASED ON CURRENT/PREVIOUS/NEXT Month
    By AK123 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-21-2016, 01:10 PM
  4. [SOLVED] Indirect Formula to report content based on two previous columns?
    By Amigo1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-11-2014, 08:18 AM
  5. Formula based on previous cell
    By abduljaleel.mca in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-04-2014, 02:36 AM
  6. Correct formula for adding columns based on previous row
    By packers316 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-02-2013, 06:44 AM
  7. Return a value in a range of cells based on a previous formula
    By gori1084 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-30-2013, 11:14 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