Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Dmorri254
 
Posts: n/a
Default Macro Modification Help

All,

Below is a macro for updating a validation list. It works fine for one list
but I have several lists
on my worksheet ..they are in columns D,E,F,I,J, and K...

Can someone help me modify the macro so that I can use it for all of my
validaton lists?

Each list has the offset parmameters attached to their defined names: example:
=OFFSET(Lookup!$C$2,0,0,COUNTA(Lookup!$C:$C),1)

All are on my lookup page in columns C,D,E,F,G,H
The macro works for my list called "Platforms"


Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Dim ws As Worksheet
Dim i As Integer

Set ws = Worksheets("Lookup")
If Target.Column = 4 And Target.Row 1 Then
If Application.WorksheetFunction.CountIf(ws.Range("Pl atforms"),
Target.Value) Then
Exit Sub
Else
i = ws.Cells(Rows.Count, 1).End(xlUp).Row + 1
ws.Range("C" & i).Value = Target.Value
ws.Range("NameList").Sort Key1:=ws.Range("C2"), _
Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End If
End If
End Sub


Thank you for your help

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM
automatic macro update boconnell Excel Worksheet Functions 4 February 9th 05 07:10 PM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM
Macro for multiple charts JS Excel Worksheet Functions 1 November 19th 04 03:44 AM


All times are GMT +1. The time now is 11:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"