Results 1 to 15 of 15

Revisit some coding to reflect the new additional data to correct the output display

Threaded View

Potholes Revisit some coding to... 07-30-2019, 10:52 PM
Potholes Re: Revisit some coding to... 08-02-2019, 05:04 AM
Potholes Look up cells and return a... 08-03-2019, 02:00 AM
AliGW Re: Revisit some coding to... 08-03-2019, 02:07 AM
Potholes Re: Revisit some coding to... 08-03-2019, 02:09 AM
AliGW Re: Revisit some coding to... 08-03-2019, 02:30 AM
Potholes Re: Revisit some coding to... 08-03-2019, 02:38 AM
Sintek Re: Revisit some coding to... 08-03-2019, 03:05 AM
Potholes Re: Revisit some coding to... 08-03-2019, 03:08 AM
AliGW Re: Revisit some coding to... 08-03-2019, 03:09 AM
Potholes Re: Revisit some coding to... 08-06-2019, 11:58 PM
Sintek Re: Revisit some coding to... 08-07-2019, 07:01 AM
Potholes Re: Revisit some coding to... 08-07-2019, 09:10 PM
Sintek Re: Revisit some coding to... 08-08-2019, 02:52 AM
Potholes Re: Revisit some coding to... 08-08-2019, 03:40 AM
  1. #1
    Forum Contributor Potholes's Avatar
    Join Date
    11-25-2011
    Location
    Brisbane
    MS-Off Ver
    Office 2021
    Posts
    774

    Revisit some coding to reflect the new additional data to correct the output display

    Hi all and thank you for looking at this thread Hopefully another for SINTEK

    Owing to the committee moving the Goal posts on me I need to do some revision on the code as listed
    below, the original code only needed to see if it was a case of 2 legs.
    Now they have asked for if for arguments sake there are 3 legs and for testing purposes only there will
    be a total of 10 checkpoints,the number of Kms per leg can vary day-to-day as do the number of CPs in each leg.
    The DEMO page has a lot NO A BLOODY LOT of formula’s.


    Before we can enter a figure into " Front Sheet " cell " H6 " we need to check cells " U4 to W4 ",
    to see how many Legs the race is run over, The figures below the 1 2 3 are the lengths for each leg.


    Then check Cells " U9 to W9" to see there if a number in those cells, these cells show how many
    checkpoints are in each leg, and will govern what LEG can be displayed in " Cell F6 ".


    For arguments sake if there is a figure in " Cell U9 " and it is a " 3 " then only " 3 " checkpoints
    will be in that the leg of the race, so in the current situation if " 1 2 or 3 " is entered into H6 " F6 "
    will show " 1st Leg " likewise when " 4 5 6 or 7 " will show " F6 " 2nd leg, and " 3rd leg" . etc etc.

    Dim val As String
    ' Coded by Sintek
    If Not Intersect(Target, Range("H6")) Is Nothing Then
        val = Target
        Application.EnableEvents = False
        If Target.Offset(, -4) >= 1 And Target.Offset(, -4) <= 100 Then
            Select Case val
                Case 1 To 3: Target.Offset(, -2) = "1st leg"
                Case 4 To 7: Target.Offset(, -2) = "2nd leg"
            End Select
        End If
        Application.EnableEvents = True
    End If

    Many Thanks in Advance

    Pete
    Attached Files Attached Files
    Last edited by Potholes; 08-02-2019 at 04:10 AM.
    One I have learnt over the last few months, " You are NEVER too old to learn ".
    Sometimes I forget to say " Thank You " for your assistance, so here I say " A BIG Thank You. "

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Additional Help With AutoFilter VBA Coding
    By kstoneman in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-09-2017, 09:36 AM
  2. VBA compare and output data to another sheet doesn't copy in the correct range
    By maym in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-27-2017, 05:57 AM
  3. [SOLVED] Excel Formula to reflect correct number sequence based on certain conditions
    By arnel_10 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-09-2017, 08:33 AM
  4. Data tables not returning correct output
    By blaketus17 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-19-2016, 10:56 AM
  5. Replies: 1
    Last Post: 03-17-2014, 04:18 AM
  6. Locating Minimum value, output additional data
    By bucklj2 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-27-2009, 01:39 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