+ Reply to Thread
Results 1 to 4 of 4

Lookup condition

  1. #1
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Lookup condition

    Hello,

    I have two column of data colA and colB. data in colB includes 0 and other numbers. i would like to use a function on colC and colD that IF colB is bigger than 0 then insert the value of ColA in ColC and insert the value of colB in colD but I don't want to have any gaps between cells. Any ideas?

    I have attached an axample file which what do I expect to get!

    Thanks
    Attached Files Attached Files
    Last edited by hanif; 01-07-2015 at 11:10 AM.

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Lookup condition

    it is a little difficult to tell what you are trying to achieve but guessing at the possible different scenarios you might want to try this in cell C2 =IF(B2>0,A2,0) and this in D2 =IF(C2<>"",B2,0) but I suspect you may actually need something done in visual basic.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Re: Lookup condition

    Thanks Sambo but this will still leave gaps between cells.

    I have done such a thing before but it was matching two dates in columns and insert the matching data in new cell. I used the following function but it's not working on this one for some how which is even easier.

    Please Login or Register  to view this content.
    Quote Originally Posted by Sambo kid View Post
    it is a little difficult to tell what you are trying to achieve but guessing at the possible different scenarios you might want to try this in cell C2 =IF(B2>0,A2,0) and this in D2 =IF(C2<>"",B2,0) but I suspect you may actually need something done in visual basic.

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Lookup condition

    Well obviously that is a more complex formula than I was considering. FOR ME (maybe not so for some others) it is difficult to tell how your data appears and how the "gaps" may show up depending on what you are doing so I'll say it again, attaching a spreadsheet with examples of what you have and what you want would go a long way toward getting a better answer.

+ 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. If or Lookup condition
    By zeez36 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-22-2014, 02:49 AM
  2. multi condition format? lookup and date condition valid for.
    By D_Rennie in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-13-2009, 11:37 AM
  3. Lookup using condition
    By shabbir in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-20-2008, 10:34 PM
  4. Max value if condition lookup
    By robotball in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-12-2007, 11:27 PM
  5. [SOLVED] Sumproduct - Condition based on lookup of a Lookup
    By Hari in forum Excel General
    Replies: 13
    Last Post: 05-31-2006, 04:30 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