+ Reply to Thread
Results 1 to 7 of 7

Loop formula

  1. #1
    Registered User
    Join Date
    01-22-2008
    Posts
    38

    Loop formula

    I am trying to build a formula that would return a value in a column based on if an 'if' function is true, but then loops to check the new row down. So for example. =if(A2="1", B2,...then check is A3 = "1" and give me data from cell B3.

    Any help would be great....

    Mark

  2. #2
    Registered User
    Join Date
    08-29-2007
    Posts
    47

    Vlookup

    I think you can accomplish this with a vlookup formula. If you have a a sheet set up like this...

    A B
    1 a
    1 b
    1 c
    2 e
    3 f

    and you're trying to get the result "c", then using
    Please Login or Register  to view this content.
    would help you.

  3. #3
    Registered User
    Join Date
    01-22-2008
    Posts
    38
    Thanks for the reply,

    What I am actually looking to get back for data would be a, b, c, d in the below example one after another in row 2, 3, 4, 5, etc.

    A B
    1 a
    1 b
    1 c
    2 z
    1 d
    3 w

  4. #4
    Registered User
    Join Date
    08-29-2007
    Posts
    47
    So you want the results from this to output into a single cell?

    So say you put this formula in C1, you want the result to be "a,b,c,d"?

  5. #5
    Registered User
    Join Date
    08-29-2008
    Location
    Massachusetts
    Posts
    1
    I am looking for a similar solution. Below is an example of what i'm looking to do. Look down column A for specific info in a cell,(this will be info from another cell) once it finds it, look in the adjacent column (B) and copy that info into column (C) next to it. continue down column (A) looking for other matches and add it to column (C).
    Example below: Search criteria is "hi"

    So if i was looking for

    A B C
    1 hi 1234 1234:aaaa:hi
    2 hi aaa
    3 hi hi
    4 bye bbb
    5 bye ccc
    6 lost 5678

  6. #6
    Registered User
    Join Date
    08-29-2007
    Posts
    47
    I'm still not quite sure what final outcome you're looking for. Are you looking for, say, D1, to contain "aaa:bbb:ccc"

    I'm not sure if the best way to accomplish this would be using formulas, as I think it might be better to use a User Defined Function or macro.

    Also, depending on how much data we're talking about here - it might just be faster to use Filters, and some copying and pasting.

  7. #7
    Registered User
    Join Date
    01-22-2008
    Posts
    38
    I am attaching a spreadsheet that will hopefully show the results I am trying to achieve. Any help would be great.

    Thank You
    Attached Files Attached Files

+ 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: 9
    Last Post: 06-06-2009, 12:09 PM
  2. loop formula to occur "N" times
    By gregvb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-17-2008, 03:28 PM
  3. loop to resize formula across multiple columns
    By inwalkedbud in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-14-2008, 03:25 AM
  4. Indirect Formula Modification?
    By mycon73 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-21-2008, 05:59 AM
  5. Trouble executing a formula
    By tiarajg in forum Excel General
    Replies: 2
    Last Post: 03-11-2008, 02:11 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