Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / September 2006

Tip: Looking for answers? Try searching our database.

advanced filter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sal21 - 17 Sep 2006 21:29 GMT
    here is the file: http://www.mytempdir.com/935740
First sorry for my english....

I have this code to insert letter "E" in column N of a sheet GAF only
if the
dates in column B of sheet GAF are into range DATAIN/DATAFIN

use for test DATAIN=01/11/2005 DATAFIN =30/11/2005)

Now, i want to use the same code to insert "E" in column N if the range
of
dates is naturally into range DATAIN/DATAFIN but if the value into
column H
is the same present into column B of sheet CORPORATE. So, insert in
column
"N" of sheet GAF the letter "E" in cells N2, N49, N50, N51
ecc...

Dim RIGA As String

Dim NUM_CONTR As Long

'If Me.TextBox1.Value = "" Then
' MsgBox ("IL CAMPO DATA INIZIO NON PUO' ESSERE VUOTO"), vbCritical
' Me.TextBox1.SetFocus
' Exit Sub
'End If

'If Me.TextBox2.Value = "" Then
' MsgBox ("IL CAMPO DATA FINE NON PUO' ESSERE VUOTO"), vbCritical
' Me.TextBox2.SetFocus
' Exit Sub
'End If

'If Me.TextBox1.Value > Me.TextBox2.Value Then
' MsgBox ("RANGE DI DATE ERRATO! DATA FINE MINORE DI DATA INIZIO"),
vbCritical
' Me.TextBox1 = ""
' Me.TextBox2 = ""
' Me.TextBox1.SetFocus
' Exit Sub
'End If

DATAIN = Me.TextBox1
DATAFIN = Me.TextBox2

'If DATAIN > DATAFIN Then
' MsgBox ("DATA FINE MINORE DI DATA INIZIO"), vbCritical
' Exit Sub
'End If

RIGA = 2

Sheets("GAF").Select

Set ELENCO = Worksheets("GAF")

ELENCO.Range("N2:N9000").ClearContents

While Not ELENCO.Range("A" + RIGA) = ""

DoEvents

If ELENCO.Range("B" + RIGA) >= DATAIN And ELENCO.Range("B" + RIGA) <=
DATAFIN Then ELENCO.Range("N" + RIGA) = "E"

RIGA = RIGA + 1

NUM_CONTR = ELENCO.Range("T1")

Me.Label4.Caption = NUM_CONTR

Wend

End Sub
Tom Ogilvy - 18 Sep 2006 04:49 GMT
Possible answer in progamming.

Signature

Regards,
Tom Ogilvy

> here is the file: http://www.mytempdir.com/935740
> First sorry for my english....
[quoted text clipped - 71 lines]
>
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.