+ Reply to Thread
Results 1 to 4 of 4

populate values in col C based on values contains in B

  1. #1
    Forum Contributor
    Join Date
    03-28-2008
    Location
    India, bangalore
    MS-Off Ver
    Excel 2003,2007
    Posts
    216

    populate values in col C based on values contains in B

    Thanks for helping me so many days, I need ur help again...
    I have 3 columns in my excel sheet,
    Col A( Data)
    Col B ( Invoice Description)
    Col C( Result)

    I have date and Invoice description column filled with data, I need to filter Column B> custom filter> contains > "Dup" and enter value as "Twice" in Column C.
    again i customer filter> contains > " Canteen" then enter value in Column C as "Tea"
    similarly i have 45 conditions and the number of rows are not fixed, I would appreciate very much if someone could help me to build a code with case function i can add all those conditions:

    few Eg:
    If values in Column B contains :"uncash" then in C column it should populate Credit in the respective rows
    If values in Column B contains :"Dup" then in C column it should populate Twice in the respective rows
    If values in Column B contains :"bug" then in C column it should populate Wow in the respective rows
    If values in Column B contains :"RQ" then in C column it should populate Pay by Check in the respective rows
    If values in Column B contains :"AP13" then in C column it should populate Payment in the respective rows
    If values in Column B contains :"Canteen" then in C column it should populate Tea in the respective rows OF
    If values in Column B contains :"RSV" then in C column it should populate Bus in the respective rows

    A sample file is attached:

    and also the cross post is here:
    http://www.mrexcel.com/forum/showthr...41#post2153941

    Thanks for you help
    Arvind
    Attached Files Attached Files

  2. #2
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: populate values in col C based on values contains in B

    Probably easiest to go with a lookup function instead of an if statement. See attached file.
    Attached Files Attached Files
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  3. #3
    Forum Contributor
    Join Date
    03-28-2008
    Location
    India, bangalore
    MS-Off Ver
    Excel 2003,2007
    Posts
    216

    Re: populate values in col C based on values contains in B

    Hi,

    Thanks for your reply,

    However vlookup is not working for this and not producing the right result
    I have marked the result which is in correct and i have also mentioned the right result.

    Thanks once again ..

    Arvind
    Attached Files Attached Files

  4. #4
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: populate values in col C based on values contains in B

    Apologies, I was in a hurry when I did that.
    If you sort the left column of the range which is being referred to alphabetically (F13-G19), VLOOKUP will work properly.

+ 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