+ Reply to Thread
Results 1 to 8 of 8

search cells using vba

  1. #1
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    search cells using vba

    hi
    think i have been going the wrong way with this ,userforms ect,
    what i need to do is insert textbox on sheet or use command button to search a spreadsheet using one criteria only, and copy results to different sheet using
    vba ,have seen various ones on here but not quite sure where to put them,ie module, macro .have tried a few aswell and none seem to work or could just be me,
    any advice help would be good
    cheers colin
    Last edited by cfinch100; 01-27-2013 at 04:25 PM.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: search cells using vba

    Hi Colin. We would need to have some more information. What is the criteria? Where is it located? What is the search range and where is the destination range? Maybe the best way to share this information is to post a copy of your file if possible with a detailed desription of what you would like to do.

  3. #3
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: search cells using vba

    hi
    i would like to get data from (mfr_list) based on cells a to e, if these cells are full of data, save them to (completed) sheet, where from there they can be sent to invoice and printed off, after that when printed they need tagging so can not be selected again.
    in the end i want to make a menu so different criteria can be used and saved under different buttons ,eg
    button 1 could be all cells a to e with data selected
    button 2 could be all cells a to e with dat missing
    something i can change without to much hassle from within the button so others can not change or have to imput data,
    i know there is a lot here anything you could help with would be good of even point the way or better way to do it
    cheers colin
    search range is all mfr_list although only 5 in at minute the most that will be awaiting invoicing would be 20
    hope this helps
    Attached Files Attached Files
    Last edited by cfinch100; 01-26-2013 at 06:21 PM.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: search cells using vba

    Hi Colin. I have to go out now but I will give it a go in the morning.

  5. #5
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: search cells using vba

    hi thanks
    anything you can help with will do, ill keep trawling forums until then looking for answers
    many thanks
    colin

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: search cells using vba

    Hi Colin. Try the following two macros. The first one, copies the range if all cells from column A to column E are filled. The second macro, copies the range if some data is missing from the range. There is only one issue you must be aware of. For some reason (I can't figure out why), the second macro will not copy the range if column A is blank. I know it's not a perfect solution, but perhaps it will get you started. Maybe someone else in the forum will be able to perfect it.

    Please Login or Register  to view this content.
    Last edited by Mumps1; 01-27-2013 at 11:06 AM.

  7. #7
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: search cells using vba

    hi
    many thanks have tried them and all work fine as good a starting point as could have hoped,look out for more later ha ha
    thanks again
    cheers colin

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: search cells using vba

    My pleasure.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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