+ Reply to Thread
Results 1 to 14 of 14

macro for searching multiple options with in workbook

  1. #1
    Registered User
    Join Date
    08-24-2012
    Location
    Maharashtra, Pune
    MS-Off Ver
    Excel 2007
    Posts
    56

    Exclamation macro for searching multiple options with in workbook

    Hello Friends
    I want help in creating macro for the following.
    I daily get a work of making this report for which I run a process through a specific software which creates this four files on server
    1. India
    2. USA
    3. 2Wheeler
    4. 4Wheeler
    My work is to create a new excel file copy Sales person names from India & USA one below the other,
    Then search the respective model sold by them in 2wheeler.
    If any salesperson has sold 4wheeler we do not copy and data from 2wheller(sheet) we search it in 4 wheeler(Sheet) and copy data from that for example in the attach file
    Raj has sold 1pulsar & 2, 4 Wheelers Therefore I didn’t took any data from 2wheeler I just search and copied model from 4wheeler
    Same way I have done with Amol, Joy & Francis
    I know this is very tough but it is not impossible hope I will get my solution so that it will save a lot of time for me
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: macro for searching multiple options with in workbook

    Hi.

    Try this macro code on Main sheet:

    createmainreport.xlsm
    Click *, if my suggestion helps you. Have a good day!!

  3. #3
    Registered User
    Join Date
    08-24-2012
    Location
    Maharashtra, Pune
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: macro for searching multiple options with in workbook

    Great work thanks but there is one thing left if any salesman sale pulsar it should leave 2wheeler sheet and start searching in 4wheeler sheet and out results from there not from 2 wheeler.

  4. #4
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: macro for searching multiple options with in workbook

    Explain with an example. I have followed the output given by you.

  5. #5
    Registered User
    Join Date
    08-24-2012
    Location
    Maharashtra, Pune
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: macro for searching multiple options with in workbook

    sorry my mistake didnt saw it, your macro works perfectly but it is very complicated actually the real work is different and the data in it is confidential which i dont want to display here can you help me in this problem if yes i will share the original data with you...

  6. #6
    Registered User
    Join Date
    08-24-2012
    Location
    Maharashtra, Pune
    MS-Off Ver
    Excel 2007
    Posts
    56

    Exclamation Re: macro for searching multiple options with in workbook

    your work should be really appreciated because it is very tough job and you were able to do it...

    see I have uploaded the actually file on which i want macro to be done
    i daily get icp's so i have to copy icp from rst and grst sheet to main sheet one below the other.

    the find error msg of each icp from uploader, and exclude error msg like "No multiplier on meter" & error starting with word "WARNING" but if any icp contain error msg "No Consumer" i will not copy and single error msg from uploader sheet, i will search the error msg in MCO101 sheet and copy and past error from there. hope i have made it clear now and will get my solution as soon as possible.....
    Attached Files Attached Files
    Last edited by vivek_work; 03-28-2013 at 09:40 PM.

  7. #7
    Registered User
    Join Date
    08-24-2012
    Location
    Maharashtra, Pune
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: macro for searching multiple options with in workbook

    Bump no response

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: macro for searching multiple options with in workbook

    You have not explained what are trying to do. All we can see is there are 5 sheets on the attached. You need to explain in detail and possibly show the desired result on a separate sheet.

  9. #9
    Registered User
    Join Date
    08-24-2012
    Location
    Maharashtra, Pune
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: macro for searching multiple options with in workbook

    i daily get icp's so i have to copy icp from rst and grst sheet to main sheet one below the other.

    then find error message of each icp from uploader, and exclude error message like "No multiplier on meter" & error starting with word "WARNING" but if any icp contain error message "No Consumer" i will not copy any single error message from uploader sheet, i will search the error message in MCO101 sheet and copy and past error from there. hope i have made it clear now...

  10. #10
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: macro for searching multiple options with in workbook

    One at a time
    "i daily get icp's so i have to copy icp from rst and grst sheet to main sheet one below the other."
    So, you want to copy ICP Identifiers from sheets RST and GRST. Which one is the main sheet? When you say copy which row/column and on what bases? Why do you need to copy them in the first place? You have not explained anything and expect people to make their own guess.

  11. #11
    Registered User
    Join Date
    08-24-2012
    Location
    Maharashtra, Pune
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: macro for searching multiple options with in workbook

    i daily have a task of preparing this report
    in my pc i have the Daily RST sheet
    i get this RST, GRST, Uploader & MCO101 files by mail
    so my work is to copy ICP no from RST & GRST to my Daily RST file
    then search the error message in Uploader
    some ICP Contains 3-4 errors so i insert appropriate row and past the errors
    but there are certains rules like
    1)I take repeated error for single ICP like some ICP contains multiple"TN Meter details missing-No Register No" error message but i only take it once for single ICP
    2) i don't copy error message starting with word "Warning" and "No multiplier on meter"
    3) if any ICP contains error message "No Consumer" i dont copy any error message from UPloader instead i search it ICP in MCO101 sheet and copy error msg from there to Daily RST file

    hope now i have made it clear now or do you want me to solve the sample file and upload it..

  12. #12
    Registered User
    Join Date
    08-24-2012
    Location
    Maharashtra, Pune
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: macro for searching multiple options with in workbook

    Quote Originally Posted by AB33 View Post
    One at a time
    "i daily get icp's so i have to copy icp from rst and grst sheet to main sheet one below the other."
    So, you want to copy ICP Identifiers from sheets RST and GRST. Which one is the main sheet? When you say copy which row/column and on what bases? Why do you need to copy them in the first place? You have not explained anything and expect people to make their own guess.
    yes i want to copy ICP Identifiers from sheets RST and GRST to Daily RST sheet. Daily RST is the main sheet, copy all the ICP Identifiers no. from RST & GRST sheets only ICP Identifier no. because Daily RST is the main sheet that's why i want to copy paste in that sheet.

    have i made it clear now?

  13. #13
    Registered User
    Join Date
    08-24-2012
    Location
    Maharashtra, Pune
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: macro for searching multiple options with in workbook

    hello please solve this friends

  14. #14
    Registered User
    Join Date
    08-24-2012
    Location
    Maharashtra, Pune
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: macro for searching multiple options with in workbook

    sorry this threat is closed now

+ 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