+ Reply to Thread
Results 1 to 3 of 3

Macros replace if arguments

  1. #1
    Registered User
    Join Date
    11-22-2010
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    36

    Macros replace if arguments

    Hi Everybody
    Actually I would like to write a macro using VBA to
    give me example
    Cell B2 must give me the result of different cells as a condition (using if_and arguments is getting so many
    Example as follow
    Cell B2 must give me result in cell B4 if it is above zero
    and if cell B4 is zero and cell B5 > 0 must give the result of B5
    if cellB5 is zero and B6 > 0 must give the result of B6 ....... up to cell B18

    Thanks

    Bakar

  2. #2
    Valued Forum Contributor gjlindn's Avatar
    Join Date
    08-01-2011
    Location
    Dodgeville, WI
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    369

    Re: Macros replace if arguments

    Hello Bakar. In your data set if B7 > 0 would B4:B6 all be equal to 0? It would be easier to solve this if I were clear on what happens to your data in range B4:B18. I'm wondering if you need a macro or a formula something like
    Please Login or Register  to view this content.
    If you can provide an example workbook that would help. Thanks!
    -Greg If this is helpful, pls click Star icon in lower left corner

  3. #3
    Registered User
    Join Date
    11-22-2010
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    36

    Re: Macros replace if arguments

    Hi gjlindh
    Hope everything going well
    Find attached screenshot
    Actually I want the result of Y25 to display in cell Y17

    fORUM.jpg

+ 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