+ Reply to Thread
Results 1 to 11 of 11

Help Needed for this Macro

  1. #1
    Registered User
    Join Date
    05-26-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2010
    Posts
    7

    Help Needed for this Macro

    I have worked this below macro and was succesful in one out come but the others are not working

    1 Delete 2861 from store
    2 Delete DXJ8934\MXA8484\RCF959 from Processor
    3 Delete + values(amt) in PLUS (cardtype)

    The below code works for Delete 2861 from store.The other two need to be in the same shee and start working once option 1 finishes then option 2 should kick in then option 3.Can any one help
    Please Login or Register  to view this content.
    https://hotfile.com/dl/224531363/f32ec0c/123.xlsm.html

    This is the sample data I have added the comments on it as well.Can any one help
    Attached Files Attached Files
    Last edited by arlu1201; 05-27-2013 at 01:12 AM.

  2. #2
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Help Needed for this Macro

    I took the liberty to write you a smaller and somewhat easier to understand code.
    Tried on your sample sheet and worked fine, so try this :

    Please Login or Register  to view this content.
    Please click the * below if this helps

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Help Needed for this Macro

    Hi Asiva,

    See if this is what you want - If it is then uncomment the penultimate line and delete the last line.

    What will happen is that it will turn all of the entries that would be deleted red

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Registered User
    Join Date
    05-26-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Help Needed for this Macro

    Worked like a charm

  5. #5
    Registered User
    Join Date
    05-26-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Help Needed for this Macro

    Dear JasperD

    With regards to PLUS

    It should delete only Positive values meaning 3000 , 4000 and the remaining negative values -3000 etc should remain . Any thoughts

  6. #6
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Help Needed for this Macro

    Hi asivaprakash

    sure, change :
    Please Login or Register  to view this content.
    to this :

    Please Login or Register  to view this content.
    Please click the * below if this helps

  7. #7
    Registered User
    Join Date
    05-26-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Help Needed for this Macro

    Sure thing that was fast but

    It should delete positive values only when the Code is PLUS

    Meaning If Plus and Greater than 0 delete hope this clarifies sorry for not being specific

  8. #8
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Help Needed for this Macro

    Sorry, misunderstood.
    Change as follows :

    Please Login or Register  to view this content.
    Is that what you mean?

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Help Needed for this Macro

    Asivaprakash,

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem. Once you have done this please send me a PM and I will remove this request.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    Also,

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. In order to put code tags, either type [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] at the end of it, OR you can highlight your code and click the # icon at the top of your post window.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  10. #10
    Registered User
    Join Date
    05-26-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Help Needed for this Macro

    Yes sir that's what i wanted

  11. #11
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Help Needed for this Macro

    asivaprakash,

    Please check the 1st point in post 9.

+ 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