Excel if statements

jamjam200

New member
Local time
Today, 14:55
Joined
Jun 13, 2006
Messages
4
on the Data tab (of the attached spreadsheet) I fill in users names and then select if they are internal or external,

what I want to do is if I enter "internal " next to a users name then their details are copied on the internal worksheet, if I select external their details are copied on to the external work sheet

Thanks for any help
 

Attachments

Hi, jamjam,

I would make use of either a query to update the data or use the advanced filter to get the data. Attached you find a soktion pulling the data form Data whenever Internal or External are activated - pleas mind the name database for the used range in Sheet Data ;):

Code:
Option Explicit

Private Sub Worksheet_Activate()
  Range(Cells(5, 1), Cells(Rows.Count, Columns.Count)).ClearContents
  Sheets("Data").Range("Database").AdvancedFilter Action:=xlFilterCopy, _
        CriteriaRange:=Range("A1:D2"), CopyToRange:=Range("A4:C4"), Unique:=False
End Sub
Ciao,
Holger
 

Attachments

Users who are viewing this thread

Back
Top Bottom