+ Reply to Thread
Results 1 to 4 of 4

here is a macro that works, anybody have an alternative suggestion?

  1. #1
    Registered User
    Join Date
    12-12-2012
    Location
    syria
    MS-Off Ver
    Excel 2010
    Posts
    13

    here is a macro that works, anybody have an alternative suggestion?

    I have done a formula by pressing ctrl+shift+enter in excel cell
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ,and then I copied it to the cells below,
    I have given this code:
    Please Login or Register  to view this content.
    and I need an equevalent code like this
    Please Login or Register  to view this content.
    but the code doesn't work, and I don,t know why.
    I couldn't use if funcion before max
    so I replaced the order
    I thinknthat the wrong is with s identifying or using ... becaus It must be an unknown count range...
    Attached Files Attached Files
    Last edited by siba; 12-28-2012 at 10:04 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,598

    Re: here is a macro that works, anybody have an alternative suggestion?

    This code:
    Please Login or Register  to view this content.
    is seriously wrong. You need to explain what you are trying to do with each line.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    12-12-2012
    Location
    syria
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: here is a macro that works, anybody have an alternative suggestion?

    I need to find the max value that have the same End as my Start for every pipe in a sewer system.
    I could do it by entering this :
    =MAX(IF(C:C=B3,D:D,0))
    by pressing ctrl+shift+Enter in cell G3, and then I copied it to all other pipes in column G, my results were right, but now I need to do it by going into loop in VBA macro using max and if functions.
    the values explained in the excel file above
    .
    .
    .
    thanks for every help.

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: here is a macro that works, anybody have an alternative suggestion?

    hi siba, option to make it, please check attachment, press "Run" button or run code "test"
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-12-2012
    Location
    syria
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: here is a macro that works, anybody have an alternative suggestion?

    So thankful watersev... It's the first woking fast code I have resieved after a long search

+ 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