+ Reply to Thread
Results 1 to 13 of 13

Is it possible to shorten this code?

  1. #1
    Registered User
    Join Date
    04-12-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    87

    Is it possible to shorten this code?

    It more than likely is instead of me repeating myself.. if possible can this carry on past my final section too?

    Please Login or Register  to view this content.
    ~Edit:

    Full sheet.zip
    Last edited by aaaaaaiden; 02-12-2014 at 07:41 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: Is it possible to shorten this code?

    Hi,



    it seems you are copying a column and then pasting it back into the same column?? (or are you simply trying to get rid of formulas from the input sheet "not inc 8%"

    it is a bit late so I may be missing the bleeding obvious, for which I apologiser

    Jmac

  3. #3
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Is it possible to shorten this code?

    My assumption, and not tested:

    Please Login or Register  to view this content.
    多么想要告诉你 我好喜欢你

  4. #4
    Registered User
    Join Date
    04-12-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Is it possible to shorten this code?

    Quote Originally Posted by jmac1947 View Post
    Hi,



    it seems you are copying a column and then pasting it back into the same column?? (or are you simply trying to get rid of formulas from the input sheet "not inc 8%"

    it is a bit late so I may be missing the bleeding obvious, for which I apologiser

    Jmac
    Basically I have an input page ("Input Page").. "Not inc 8%" has formulas that pick up the date in B1 and matches the name and information from the input page and basically copies and pastes as values for the date picked up.

    There's probably a better way but that was what I could do with my knowledge ha!

  5. #5
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: Is it possible to shorten this code?

    My experience says Millz generally gets very close so tghat is worth a try I would say, failing that you should probably go back to first principles and post a sample workbook with data and expected results.

    That will focus our minds on the exact problem, rather than what we think you problem is.

    Jmac

  6. #6
    Registered User
    Join Date
    04-12-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Is it possible to shorten this code?

    Quote Originally Posted by jmac1947 View Post
    My experience says Millz generally gets very close so tghat is worth a try I would say, failing that you should probably go back to first principles and post a sample workbook with data and expected results.

    That will focus our minds on the exact problem, rather than what we think you problem is.

    Jmac
    Zip file has been attached to original post.. Full spreadsheet that should work.. could you please have a look at it (modules are abit of a mess but mostly follow one another)

  7. #7
    Registered User
    Join Date
    04-12-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Is it possible to shorten this code?

    Quote Originally Posted by jmac1947 View Post
    My experience says Millz generally gets very close so tghat is worth a try I would say, failing that you should probably go back to first principles and post a sample workbook with data and expected results.

    That will focus our minds on the exact problem, rather than what we think you problem is.

    Jmac
    Zip file has been attached to original post.. Full spreadsheet that should work.. could you please have a look at it (modules are abit of a mess but mostly follow one another)

  8. #8
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Is it possible to shorten this code?

    What is connection between B1 value and columns? The dates do not seem to correspond?
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  9. #9
    Registered User
    Join Date
    04-12-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Is it possible to shorten this code?

    Quote Originally Posted by Izandol View Post
    What is connection between B1 value and columns? The dates do not seem to correspond?
    Columns include formula to convert to text and match up like two co-ords.

    In input screen put 13/06/15 for example in orange box
    yellow box "Altrincham" box to the right 1000 and you will see on "not inc 8%" that the value has been posted in the Jun 15 column

  10. #10
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Is it possible to shorten this code?

    I mean what is connection between May 13 and column GK in this code?
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    04-12-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Is it possible to shorten this code?

    Quote Originally Posted by Izandol View Post
    I mean what is connection between May 13 and column GK in this code?
    Please Login or Register  to view this content.
    That may be wrong check from jan14 onwards see if that makes sense. (I have removed or added a few rows and only updated the macro for the months that hadn't had info included)

  12. #12
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Is it possible to shorten this code?

    Is it simply question of locating same month column and converting formulas to values?

  13. #13
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Is it possible to shorten this code?

    If this is correct, you may try:
    Please Login or Register  to view this content.

+ 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. please help shorten this code
    By newbiewexcel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-22-2013, 11:38 PM
  2. [SOLVED] Shorten my Code
    By yoko21 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-04-2013, 07:07 AM
  3. [SOLVED] Very inefficient code because of different sizes of arrays, how do i shorten my code?
    By Brammer88 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-28-2012, 04:49 PM
  4. [SOLVED] Shorten VBA Code......!!!!
    By sagar007 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-26-2012, 08:27 AM

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