+ Reply to Thread
Results 1 to 16 of 16

Adding some correction to existing macro

  1. #1
    Registered User
    Join Date
    05-28-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    96

    Adding some correction to existing macro

    the following macro which i got from someone very helpful Mr. jindong in this forum is allowing me to extract data that come in form of lotus version and turn it to VBA version , this macro working very good , but now i have some problems which hope to get some help ,
    1. every time when the value is "0" it doesn't execute the macro. (look on sheet 1) it happens only if i put apostrophe before the "0"(i.e "'0") my question is........... what i need to change or to add in the module 1 (sub test_3) to make it work ???
    2. row 12 (yellow highlight) {EDIT-CLEAR B:D1810..B:H1810;"CONTENTS"} it read: Range("D1810:H1810").ClearContents , but it should be sheets("sheet B").Range("D1810:H1810").ClearContents...............what need to add in the macro to make it work ???
    3. row 251 (orange highlight),{EDIT-COPY B:F9}, it should be sheets("sheet B").range("F9").copy.......... what need to add in the macro to make it work ????
    4.row 252 (blue highlight),{SELECT B:J73..B:J84}, it should be sheets("sheet B").Range("J73:J84").Select...............what need to add in the macro to make it work ??????
    5. row 253 (gray highlight),{EDIT-PASTE}, should be Past of the value of B:F9 (point3) ...............what need to add in the macro to make it work
    6. row 272 column B (green highlight),{CELL-ENTER "(+I:F651/3)"} should be Sheets("sheet I").Range("F651"/3) (i.e it should be divided by 3)...............what need to add in the macro to make it work ???
    i wanted to attached my worksheet so it will more explanatory but i could not see how to do that , i don't have the attached file option

    thank you in advance for all your collaboration it should save me ton of time if i can make it work , just not so so good in VBA to that level to correct my macros
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,514

    Re: Adding some correction to existing macro

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

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

    Test the attached hard.
    Attached Files Attached Files

  3. #3
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Adding some correction to existing macro

    Hi jindon,
    in your revised workbook, you changed this pattern after the pattern for Select:
    Please Login or Register  to view this content.
    with this one
    Please Login or Register  to view this content.
    and it works well

    I did the following change to the pattern and it seems to work too but I'm probably missing something.
    Please Login or Register  to view this content.
    I tried to understand your pattern but it is well over my head.
    Would it be possible for you to explain it? And why my pattern works or does not work?
    Thanks for your help
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,514

    Re: Adding some correction to existing macro

    If it is working fine, it should be OK.

    This was written some time ago so I almost forgot how it is exactly doing, but I do remember it is no so simple to generalize the pattern.

  5. #5
    Registered User
    Join Date
    05-28-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    96

    Re: Adding some correction to existing macro

    hi jindon

    than you very much for your assistance i also got your remarks regarding my thread title and i will follow them , but as always you are awesome , and i really appreciate that , you don't know how much your work and assistance is helpful and time saving .and i must indicate that all the guys in this forum doing excel ant work.
    i have one more question as you can see in shet1 line 27 to 30 and line 262 to 266 how i can call those macros ??? how do you think it need to be, (i.e call PROJUN12, or PROJUN12.run) ????
    and lines 249-250 {EDIT-CLEAR T:F920..T:J956;CONTENTS}how i can call to those rows? it should be sheets("sheet T").Row("F920:J956").clearcontents
    also line 17 sheet1 column B {CELL-ENTER "Average Cost % 4 Years"} it does not call the value that should be it left empty , don't know why
    Last edited by Pilot5000; 03-24-2015 at 09:38 AM. Reason: adding question

  6. #6
    Registered User
    Join Date
    05-28-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    96

    Re: Code Problem, and Need Advice

    hi jindon

    again thank you for your help , can you please assisted me with my last problems as mentioned above

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,514

    Re: Adding some correction to existing macro

    OOps, sorry I missed your last post...

    Try the attached
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    05-28-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    96

    Re: Adding some correction to existing macro

    hi jindon
    Please accept our sincere gratitude for your help, I appreciated your unfailing attention to my requirements and needs ,moreover , i feel fortunate for the time you donated and again Thank you very much for the extra help you gave me in resolving this matter

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,514

    Re: Adding some correction to existing macro

    You are welcome and just post back if you find any bugs.

  10. #10
    Registered User
    Join Date
    05-28-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    96

    Re: Code Problem

    Hi jindon

    your code work excellent , only one problems, in sheet 1 line 11 , it does not separate the sheet like in line 12, the line is
    {SELECT B:D1810..B:H1810;B:D1810}
    and after we executing the code it should be Sheets("sheetB").Range("D1810:H1810")select, instant it giving me
    Sheets("sheetB").Range("D1810:H1810;B:D18103").Select. as you can see in the range it calling to the sheet-B
    when it should be like as in line 12 , i tried several things but i can not find the appropriate solution it seems too complicate for me

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,514

    Re: Adding some correction to existing macro

    OK, this should be better.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    05-28-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    96

    Red face Re: help with VBA code

    hi man

    thank you very much it work wonderful, just to informed you i could not give you green in reputation , therefore i sent letter to the admin of this site and
    let them know about your work and your assistance that you provided me in this matter, i just didn't hope that this is Ok with you !! http://www.excelforum.com/images/icons/icon11.png

  13. #13
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,514

    Re: Adding some correction to existing macro

    As I have probably told you? It does not surprises me if it happens in this site.

    I am now having problem in downloading attachment, some are OK, but some tells me,
    "You are not logged in"....

    Don't worry about it, the words you gave me is more than enough and I really appreciate.

  14. #14
    Registered User
    Join Date
    05-28-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    96

    Re: need some more help pleases

    Hi jindon
    I tried working with your last macro, must to mentioned that it’s exactly what I needed , the only thing is I have still have some points in which I need your assistance so I can finalize my work.
    1. Your macro does not convert Range A:3 , bit in the other side it’s convert Range A:12 , why?
    2. All ranges with '{SELECT & the range } it convert but when I have the {CELL-ENTER & range it’s dopes not convert if I don’t have + before the column and “ “ around the + column & range (i.e {CELL-ENTER "+ D:I15"})
    3. Another issues with the select is that when there is not space between the (+) and the column , the outcome of the conversion for the sheet is not correct because there is no space between the sheet and sheet name (i.e Sheets("sheetB") see the different range 4 & 5 in the attached workbook
    4. In range A:14 the conversion give only the range without the sheet and I need also the sheet (i.e Range("P2918:R2918").Select should be sheets(“sheet B”).Range("P2918:R2918").Select ) like in row 15 but with the space for the sheet as mentioned in point 3
    5. I know that I am asking too much but please look on the macro in module 1 Sub pilot_insert() what I am looking for is to have 1 macro that will do everything in one click , at the present time I need to copy each block of information from sheet Macro_2 to another sheet then run the macro Sub pilot_insert which basically in the end copy the information to another sheet sheet 2 and only then run your macro , is there is any option to do that in one click and save me lots of time I have information in my project in sheet macro_2 all the way until row 3000 and from column A to column FZ ??? please help me with that if you want I send you the full sheet with all the macros there
    Thank you in advance again
    Attached Files Attached Files

  15. #15
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,514

    Re: Adding some correction to existing macro

    Pilot5000,

    The code doesn't convert such because the code is not written for that lines.

    You should start from scratch and tell us EVERYTHING that you want, otherwise one by one addition is confusing and makes the code difficult to read/remember.

  16. #16
    Registered User
    Join Date
    05-28-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    96

    Re: Adding some correction to existing macro

    i understand you since then i was able to fix some issues from my previous thread , and now i will try to make things more clear ,so it will not be confusing , anyway thank you for your time

+ 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. [SOLVED] Adding a loop to an existing macro
    By trisoldee in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-30-2013, 01:12 PM
  2. Adding Progress Bar to existing Macro...
    By Zoediak in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-28-2013, 04:32 PM
  3. Adding to an existing macro
    By dcargill in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-27-2012, 09:32 AM
  4. Adding Series to my existing VBA Macro
    By dan_hibiki in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 05-24-2010, 05:54 AM
  5. Adding a new key combination to an existing Macro
    By nandy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-07-2009, 04:47 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