Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
PETTY CASH
Hi,
I have a petty cash sheet, and there's one column for miscellaneous account, so i have data validation list box so when i pick the account shows the description and account but then i just want to display the account number after i selected,by the way i have petty cash sheet and code sheet where it pull the account from. here it's the code for the petty cash sheet: ( i don't know what i am doing wrong it display it put both but i just want the account number. Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo errHandler If Target.Cells.Count 1 Then GoTo exitHandler If Target.Column = 2 Then If Target.Value = "" Then GoTo exitHandler Application.EnableEvents = False Target.Value = Worksheets("Codes").Range("A1") _ .Offset(Application.WorksheetFunction _ .Match(Target.Value, Worksheets("Codes").Range("ProdList"), 0), 0) End If exitHandler: Application.EnableEvents = True Exit Sub errHandler: If Err.Number = 13 Or Err.Number = 1004 Then GoTo exitHandler Else Resume Next End If End Sub (is there anyway i can post the file so it's easy to know what i am talking about, if any body want to use it, it's OK. Thank you very much for your help -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...tions/200911/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Petty cash hell | Excel Discussion (Misc queries) | |||
Petty Cash Controller | Excel Discussion (Misc queries) | |||
Petty Cash Log Help | Excel Worksheet Functions | |||
petty cash report | Excel Discussion (Misc queries) | |||
I need a petty cash template. can anyone help me? | Excel Discussion (Misc queries) |