+ Reply to Thread
Results 1 to 5 of 5

Excel Macro revolving around finding a certain number from a list

  1. #1
    Registered User
    Join Date
    06-14-2014
    Posts
    2

    Excel Macro revolving around finding a certain number from a list

    Here is my question:
    I apologize in advance for my poor explanation, but I am trying to create an excel macro formula which will;
    1. check the number in row 1 column A
    2. see if that same number is present in column B(any row)
    3. if it is anywhere in column B, add 1 value to column C of the same row the number was found in column B
    4. if there number isn't found anywhere in column B, add the number to the bottom of the list of column B, and add 1 value to column C next to it.
    5. repeat this with row 2 column A, then row 3 column A, etc. until the last number in column A.

    for example,
    A B C
    3 4 1
    6 3 1
    __8 2

    would turn into:
    3 4 1
    6 3 2
    __8 2
    __6 1

    it would be greatly appreciated if someone can make a macro formula for this or even explain one of the steps.
    thanks.
    Last edited by skolzi; 06-15-2014 at 03:40 AM.

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,086

    Re: Excel Macro revolving around finding a certain number from a list

    Try
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Excel Macro revolving around finding a certain number from a list

    hi skolzi, option, press "Run" button or run code "test"
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-14-2014
    Posts
    2

    Re: Excel Macro revolving around finding a certain number from a list

    Hmm, I seem to get errors with both formulas :/

    So, using my very limited excel macro knowledge, i made this. However, it comes back saying it is invalid(although I kind of expected that). If I'm completely off the mark, please just ignore this but is there any reason why this formula wouldn't work?
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,086

    Re: Excel Macro revolving around finding a certain number from a list

    skolzi
    Can you explain what ran wrong the macro sent, with your sample it seems OK!
    In your code you are doing a " .Find" but what is the range used: See "With WkRg" in my code
    Better send the sample you are using to debug
    PCI
    Last edited by PCI; 06-15-2014 at 06:30 PM. Reason: Typo

+ 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. Excel macro - finding the correct number
    By Petezh193 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-10-2009, 09:20 AM
  2. Finding the 3rd largest number in a list
    By N Harkawat in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 AM
  3. Finding the 3rd largest number in a list
    By N Harkawat in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 06:05 AM
  4. Finding the 3rd largest number in a list
    By Simon Jefford in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  5. Finding the 3rd largest number in a list
    By Simon Jefford in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-28-2005, 12:05 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