+ Reply to Thread
Results 1 to 8 of 8

Find first value

  1. #1
    Registered User
    Join Date
    06-26-2008
    Posts
    13

    Find first value

    Hi

    I want to create a macro to search the C column for the first cell that contains a 1 then put the corresponding A value in the next available cell in the D column. So i can then get a long list of those A values.

    Any help would be Appreciated

  2. #2
    Registered User
    Join Date
    08-18-2008
    Location
    Singapore
    Posts
    79
    Please elaborate. What you gave is unclear.

  3. #3
    Registered User
    Join Date
    06-26-2008
    Posts
    13
    ok sorry

    I have a list of random numbers from 1 to 52 in the B column. I then have in the C column an if formula that gives a 1 if the value in the B column is between 1 and 13. Also i have row numbers in the A column. I need to put the first row number where the C column is 1 in the first blank cell in the D coulmn. So every time i refresh the random numbers i get a new value in the D column. So after refreshing the data i get a large list of numbers.

    Hope i made myself a bit clearer

    thanks
    Attached Files Attached Files
    Last edited by adamhenderson; 08-23-2008 at 09:53 PM.

  4. #4
    Registered User
    Join Date
    08-18-2008
    Location
    Singapore
    Posts
    79
    So you want the row numbers of all the 1s in column C to be shown in column D?

  5. #5
    Registered User
    Join Date
    06-26-2008
    Posts
    13
    only the first 1. And then when i refresh, the new first 1 is displayed in the next value in the D column.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello adamhenderson,

    The data keeps changing not due to a query but due to the formulae you have in column "C". Unless these are removed or calculation turned off, the resulting search will not reflect the final data correctly.

    Sincerely,
    Leith Ross

  7. #7
    Registered User
    Join Date
    06-26-2008
    Posts
    13
    ok tanks for you help anyway

  8. #8
    Forum Contributor
    Join Date
    08-22-2008
    Location
    S-o-t
    MS-Off Ver
    Office 2000 & 2010
    Posts
    166
    Hi Adam

    I think this is what you were looking for.

    Please find attached your sheet with the code

    Dave
    Attached Files Attached Files

+ 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. Multiple search strings using FIND function
    By tg000001 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-27-2014, 12:47 PM
  2. [SOLVED] match 3 hold digits
    By stewart08 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 04-13-2008, 03:30 PM
  3. Programming a Find Loop?
    By mcbain in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-21-2008, 04:44 AM
  4. find, meet condition, sum range, deduce, find next
    By pinstripe in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-27-2007, 09:30 AM
  5. Using find function to find entries in multiple cells
    By stanigator in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-11-2007, 08:45 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