LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Code using A sheet to find a number

Can someone help please
I would like for it to look at sheet2 and see if "V014989" Is in the column
A Row 2:65535



Private Sub StoreAccountNumbers()
On Error Resume Next
With ActiveSheet
If .Range("B3").Value = "V014989" Then
.Name = "101_" & Format(Now(), "[$-409]yyyymmdd;@")

ElseIf .Range("B3").Value = "V014990" Then
.Name = "102_" & Format(Now(), "[$-409]yyyymmdd;@")
End If
End With
With ActiveSheet
If .Range("B3").Value = "V014991" Then
.Name = "103_" & Format(Now(), "[$-409]yyyymmdd;@")
ElseIf .Range("B3").Value "V014991" Then
.Name = "Unknown_" & Format(Now(), "[$-409]yyyymmdd;@")
End If
If Err.Number < 0 Then
MsgBox Err.Number & " -- " & Err.Description
End If
On Error GoTo 0
End With
'PromptForSave
'SaveWorkbookToFolder
End Sub
 
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
VB code to copy sheet format to another sheet ASU Excel Discussion (Misc queries) 12 August 10th 06 02:37 AM
Why code for find() is not working jesmin Excel Discussion (Misc queries) 1 December 28th 05 08:43 PM
to find number of days between 2 dates using vba code in excel sjayar Excel Discussion (Misc queries) 3 November 3rd 05 06:24 AM
how do i create an access code sheet to number my office files an. dana New Users to Excel 1 February 12th 05 03:49 AM
Find all text instances in a sheet and add one number from each row Greg Excel Discussion (Misc queries) 1 January 31st 05 11:45 PM


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

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

About Us

"It's about Microsoft Excel"