+ Reply to Thread
Results 1 to 3 of 3

creating a formula with any type of loop

  1. #1
    Registered User
    Join Date
    10-10-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    58

    creating a formula with any type of loop

    Hello,

    I wanted to create a loop of any kind to the following. suppose I have two columns: A & B. What I would like to do is in Column A, if the name "john" appears i would like it to help me write a simple addition formula. for example, if the name "john" is located in cells a1,a3,a5,a6,a8 and a10, how would i be able to utilize a loop and create the formula "=B1+B3+B5+B6+B8+B10"?

    Thanks.arithmetic loop.xlsx

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: creating a formula with any type of loop

    How about no loop and the formula =SUMIF(A:A,"john",B:B)
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    10-10-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    58

    Re: creating a formula with any type of loop

    Thank you very much for the quick reply. I would, but because a sheet that I have created has a ton of moving parts, it's not efficient to use a sumif. This was the best solution that I could think of.

+ 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. Creating a loop with a small formula
    By flunzy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-13-2014, 11:17 AM
  2. [SOLVED] Type mismatch in a loop code
    By chiidzzz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-31-2013, 05:57 AM
  3. Question on Creating Loop type Macro
    By mavrik5150 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-07-2011, 02:20 PM
  4. For type loop verse Do type loop
    By boylejob in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-09-2007, 03:02 PM
  5. Loop through a User-Defined Type?
    By uf_gator in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2006, 03:00 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