+ Reply to Thread
Results 1 to 4 of 4

Find first non-zero value in specific cells within active row

  1. #1
    Registered User
    Join Date
    11-17-2011
    Location
    Ottawa
    MS-Off Ver
    Excel 2003
    Posts
    18

    Find first non-zero value in specific cells within active row

    Hi all. I have a question about finding cells in the active row. Basically, here is what I want to do:

    Let's say the active row is 124 (C124 is selected). I would like to write a macro that determines the active row then looks at specific columns and determines the first non-zero row out of those specific columns.

    For this example, we'll say the columns to be searched are B, F, H, Z, AE, and AF

    So, the user selects row 124 and then runs the macro, here's what would happen:

    The macro would first look at B124, then F124, then H124, then Z124, then AE124 then AF124, but would stop and select the first non-zero value. If no non-zero value is found, a msgbox pops up and say "no value found".

    Thanks!
    Last edited by touchofknowledge; 12-19-2011 at 06:27 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Find first non-zero value in specific cells within active row

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    11-17-2011
    Location
    Ottawa
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Find first non-zero value in specific cells within active row

    Hi shg. Works great! Thank you very much.

  4. #4
    Forum Contributor
    Join Date
    01-08-2012
    Location
    Saudi Arabia, Dammam
    MS-Off Ver
    MS Office LTSC Professional Plus 2021
    Posts
    113

    Re: Find first non-zero value in specific cells within active row

    The samething i need but searching should be for a set of columns like "C" to "BG" and look for the cell which is having the value and the column "B" should have the vertical look up of row number 125.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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