Results 1 to 5 of 5

Order Data Based on Cell Value, Trigger Automatically When Cell Value Changes

Threaded View

  1. #1
    Registered User
    Join Date
    09-28-2023
    Location
    London, England
    MS-Off Ver
    MS 365 Version 2307 64-bit
    Posts
    25

    Order Data Based on Cell Value, Trigger Automatically When Cell Value Changes

    Hi all,

    I am trying to get a data set to automatically reorder itself when a value in a cell in a specified column is changed (in the example spreadsheet it would be column C).
    This is what I have so far which works when I manually run the sub, but not when I change a value:

    Private Sub Worksheet_Change(ByVal Target As Range)
    
    If Not Intersect(Target, Range("C2:C7")) Is Nothing Then
    
    Sub SortDataWithHeader()
    Range("Relabel").Sort Key1:=Range("C2"), Order1:=xlAscending
    
    End If
    
    End Sub
    What am I doing wrong?

    Many thanks in advance!
    Attached Files Attached Files
    Last edited by EllenAW; 03-20-2024 at 06:58 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 12-27-2020, 09:15 PM
  2. IF or SUM IF to calculate percentage of a cell based on a cell trigger
    By BiancaAngel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-04-2019, 11:19 PM
  3. Trigger message box after user updates VBA form based on data calculated in a cell
    By blackelvis73 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-15-2016, 12:51 PM
  4. [SOLVED] How can we trigger a simple macro based on cell value of another cell automatically with
    By omega0010 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-16-2013, 05:02 PM
  5. Automatically send an email based on the value of a cell and/or trigger date
    By psn.arya in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-05-2013, 06:17 PM
  6. Automatically Trigger Event when Cell Changes
    By Thinkslow in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-01-2013, 03:34 AM
  7. [SOLVED] sorting cell data based on order of digits
    By rosh@excel in forum Excel General
    Replies: 7
    Last Post: 12-12-2012, 02:52 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