+ Reply to Thread
Results 1 to 13 of 13

Need a formula to count how many entries i have with a incemental value of 2

  1. #1
    Registered User
    Join Date
    03-15-2010
    Location
    copenhagen
    MS-Off Ver
    Excel 2003
    Posts
    6

    Need a formula to count how many entries i have with a incemental value of 2

    Ok, so this is gonna be hard to explain, as im not native in english, but i am certainly gonna try my best

    Lets say i have this list, i want to find out how many streetnames are identical, and has a value of either +2 or -2

    Obviously in the relatively small example below, its 0, but i have a list containing 18000 adresses, and i have to visit them all, sooner or later.
    And id like to know how many of these adresses who has a neighbour adress, and in my country the left side of the street has oddnumbers and the other side has even numbers..

    Is there a way to count how many "neighbouring" adresses there are?


    Zip Not relevant City Street name Number
    2700 Københavns kommune Brønshøj Arkaderne 42
    2400 Københavns kommune København Bispebjerg Bakke 23
    2400 Københavns kommune København Bygmestervej 5
    2500 Københavns kommune Valby Gåsebæksvej 16
    2300 Københavns kommune København Kløvermarksvej 70
    2100 Københavns kommune København Lyngbyvej 172
    1051 Københavns kommune København Nyhavn 6
    2400 Københavns kommune København Rentemestervej 23
    1453 Københavns kommune København Sankt Peders Stræde 49
    2300 Københavns kommune København Sundbyvester Plads 2
    2300 Københavns kommune København Sundparken 16

  2. #2
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,210

    Re: Need a formula to count how many entries i have with a incemental value of 2

    to count would be interesting as if on a street there were addresses at 2 ,4, 6, 8, 10 what would you wish to return?

    1) A flag on each line
    2) a count of 5
    3) a count of 10

    countifs(column with street,street on row,column with city, row with city, column with number, row with number +2)+countifs(column with street,street on row,column with city, row with city, column with number, row with number -2)

    might give you some indication

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    03-15-2010
    Location
    copenhagen
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Need a formula to count how many entries i have with a incemental value of 2

    ehm, ill try that later..

    Id like to know how many there are, an exact count (no flags)

    I guess what could be done is something like this, if it can be done for two entire columns...

    If a1 = a2 & b1 = b1+2




    I just need it in excel language...

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,709

    Re: Need a formula to count how many entries i have with a incemental value of 2

    It's really not much use providing a sample of data that will not generate a result that can be tested!!!

    Please provide the workbook as soon as you can.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    03-15-2010
    Location
    copenhagen
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Need a formula to count how many entries i have with a incemental value of 2

    so i attached a minor sample of a testwork book, where formulas can be tested.

    I think thats what you require

    i believe the count should be 7 on this one, but it depends on wether the formula counts both ways, or dosnt count the first one with it. in anycase with this small sample the count value could be verified either way.

    So the logic i need to make is.


    so i need assistance in how to make the formula count how many occurances of same streetname, and only 2 in value increase in the number..

    is it possible?
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,709

    Re: Need a formula to count how many entries i have with a incemental value of 2

    This is the data you have given us:

    Excel 2016 (Windows) 32 bit
    A
    B
    1
    vej nr
    2
    Abilgårgsvej
    2
    3
    Abilgårgsvej
    4
    4
    Abilgårgsvej
    6
    5
    Abilgårgsvej
    9
    6
    Abilgårgsvej
    11
    7
    Peter Bangs Vej
    13
    8
    Peter Bangs Vej
    15
    9
    Valbygade
    26
    10
    Valbygade
    32
    Sheet: Ark1

    What is the logic telling you that the count should be 7? What exactly are you counting?

  7. #7
    Registered User
    Join Date
    06-04-2018
    Location
    Europe
    MS-Off Ver
    Office365
    Posts
    78

    Re: Need a formula to count how many entries i have with a incemental value of 2

    Something was wrong with the site, I can't replay...
    Last edited by Tommy90; 09-25-2018 at 02:36 AM.

  8. #8
    Registered User
    Join Date
    06-04-2018
    Location
    Europe
    MS-Off Ver
    Office365
    Posts
    78

    Re: Need a formula to count how many entries i have with a incemental value of 2

    Quote Originally Posted by AliGW View Post
    This is the data you have given us:

    Excel 2016 (Windows) 32 bit
    A
    B
    1
    vej nr
    2
    Abilgårgsvej
    2
    3
    Abilgårgsvej
    4
    4
    Abilgårgsvej
    6
    5
    Abilgårgsvej
    9
    6
    Abilgårgsvej
    11
    7
    Peter Bangs Vej
    13
    8
    Peter Bangs Vej
    15
    9
    Valbygade
    26
    10
    Valbygade
    32
    Sheet: Ark1

    What is the logic telling you that the count should be 7? What exactly are you counting?
    Hi,

    The logic is that for the same name in the address, different numbers are 2.
    I have highlighted with different colors.

  9. #9
    Registered User
    Join Date
    03-15-2010
    Location
    copenhagen
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Need a formula to count how many entries i have with a incemental value of 2

    so is it possible?

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,709

    Re: Need a formula to count how many entries i have with a incemental value of 2

    I still don't understand what your logic is - sorry. Tommy's post did not help me.

  11. #11
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Need a formula to count how many entries i have with a incemental value of 2

    Hi

    I suppose the data is sorted.

    Try this formula in C2 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    03-15-2010
    Location
    copenhagen
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Need a formula to count how many entries i have with a incemental value of 2

    Thank you very much Jose... it worked, and i could easily do a count of "yes" afterwards..

    thank you

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,709

    Re: Need a formula to count how many entries i have with a incemental value of 2

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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] Formula to count repeated entries only once if criteria is met
    By majana54 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-10-2017, 10:37 AM
  2. [SOLVED] Formula to count # of entries in column
    By rizmomin in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-12-2016, 10:27 AM
  3. Formula to count instances of date entries
    By Fno in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-04-2016, 03:19 PM
  4. [SOLVED] Formula to Count Entries
    By hanidean in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-01-2013, 07:09 AM
  5. [SOLVED] Formula to count entries
    By hanidean in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 05-24-2013, 08:59 AM
  6. [SOLVED] Count entries in a range formula required
    By mukeshbaviskar in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-23-2013, 09:34 PM
  7. Help - Incemental FileName
    By Pasalmeida in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-01-2013, 05:41 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