+ Reply to Thread
Results 1 to 4 of 4

Scan and Count Rows

  1. #1
    Forum Contributor
    Join Date
    06-15-2013
    Location
    United States
    MS-Off Ver
    Excel 2016
    Posts
    213

    Scan and Count Rows

    Hello,

    I have a list that has a combination of cities listed in one field for about 20 rows. Some of the rows have one city some have three. I'm looking for a macro that will search all the rows in Column D and row 4 down on sheet2. It will search for the words Miami, New York, Texas. The total amount of times these come up will go to their corresponding rows on Sheet 1. Miami will have a total on e3, New york will total on f3 and Texas will total on g3. If there is a city that is not one of these it will total on sheet1 in cell h3. The macro will run for 30 rows. Any help on this would be greatly appreciated. Thanks for your time.

    Trevor

  2. #2
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Scan and Count Rows

    Please attach a sample workbook.
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  3. #3
    Forum Contributor
    Join Date
    06-15-2013
    Location
    United States
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: Scan and Count Rows

    Here is a sampleforum test.xlsx

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Scan and Count Rows

    A simple CountIf function should do the trick.

    Here is for Miami:
    Please Login or Register  to view this content.
    Edit: Hmm just noticed that you need the other. I will make you a custom function for that
    Edit2: Here you go. You would use the formula like this: =Count_Other(Sheet2!D4:D12, "Miami, New York, Texas")

    Please Login or Register  to view this content.
    Last edited by stnkynts; 01-31-2016 at 12:30 AM.
    If you are happy with my response please click the * in the lower left of my post.

+ 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. RFID Time and date stamp on scan and off scan
    By forey89 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-14-2015, 06:46 AM
  2. Scan-in, Scan-out tool inventory with barcode scanner
    By rycr023 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2014, 11:52 AM
  3. Replies: 5
    Last Post: 11-12-2012, 08:38 PM
  4. scan through sheets to count cells with specific content
    By ossa in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-06-2012, 12:08 PM
  5. Best way to scan a column top to bottom summing and deleting whole rows that sum 0?
    By dumow880 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-11-2011, 10:35 PM
  6. HOW CAN I SCAN DATA WITH COLUMNS AND ROWS DIRECTLY INTO SPREADSHE.
    By SUFI DARWAISH in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 04-20-2005, 01:06 PM
  7. Scan range of rows and export to 2nd worksheet
    By Adam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-14-2005, 02:06 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