+ Reply to Thread
Results 1 to 8 of 8

Macro code for 3 case

  1. #1
    Forum Contributor
    Join Date
    11-10-2012
    Location
    istanbul
    MS-Off Ver
    Excel 2013
    Posts
    297

    Macro code for 3 case

    I have the below code.(in my worksheet VBA page)
    Please Login or Register  to view this content.
    in D6:D75 numbers to be input.
    From G6:G75 this numbers to be calculated.

    With this code only D6:D75 range is working at G6:G75 area. E6:E75 and F6:F75 Targets does not run with D6:D75 together.

    I want to run for three case at G6:G75 range.

    What is missing or wrong in this case?

    Anyone can correct the logic of the code, or new one?

    Thanks in advance for any reply and help.
    Regards,
    turist

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Macro code for 3 case

    Try:
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Contributor
    Join Date
    11-10-2012
    Location
    istanbul
    MS-Off Ver
    Excel 2013
    Posts
    297

    Re: Macro code for 3 case

    Quote Originally Posted by Olly View Post
    Try:
    Please Login or Register  to view this content.
    Thanks for reply.
    But 3rd condition was:
    [CODE]If Intersect(Target, [f6:f75]) Is Nothing Then Exit Sub
    Target.Offset(0, 1) = -Target + Target.Offset(0, 1)

    How can you fix the code if this condition exist? ( İn F column numbers will not be added, will be excluded at G column as (-) )

  4. #4
    Forum Contributor
    Join Date
    04-24-2007
    Location
    NYC
    MS-Off Ver
    2k3/2k7/2010
    Posts
    270

    Re: Macro code for 3 case

    Use "Else If" for the concurrent if statements.

  5. #5
    Forum Contributor
    Join Date
    04-24-2007
    Location
    NYC
    MS-Off Ver
    2k3/2k7/2010
    Posts
    270

    Re: Macro code for 3 case

    Use "Else If" for the concurrent if statements.

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    11-10-2012
    Location
    istanbul
    MS-Off Ver
    Excel 2013
    Posts
    297

    Re: Macro code for 3 case

    Quote Originally Posted by slx View Post
    Use "Else If" for the concurrent if statements.

    Please Login or Register  to view this content.
    Thanks for reply , but NOT WORKING.

  7. #7
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Macro code for 3 case

    Quote Originally Posted by turist View Post
    How can you fix the code if this condition exist? ( İn F column numbers will not be added, will be excluded at G column as (-) )
    Try:
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    11-10-2012
    Location
    istanbul
    MS-Off Ver
    Excel 2013
    Posts
    297

    Re: Macro code for 3 case

    Quote Originally Posted by Olly View Post
    Try:
    Please Login or Register  to view this content.
    Dear Olly,

    Thanks a lot for your solution.
    Regards and rep.
    turist.

+ 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. Replies: 3
    Last Post: 02-06-2014, 03:44 AM
  2. Macro code using IF case with variable inputs for logical test condition
    By m2krishnan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2013, 10:59 PM
  3. [SOLVED] Disregard case in VBA code. (UCase, LCase, Select Case)
    By Orestees in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 09-07-2012, 12:12 PM
  4. VBA Case Code
    By zit1343 in forum Excel General
    Replies: 2
    Last Post: 08-22-2011, 05:20 PM
  5. Select Case code not executing macro on Dropdown (change)
    By 4am in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-10-2010, 02:32 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