The computer generates the date the change was made, and uses that to reference a date column. I imput like 1/18 and the computer automatically converts it to 1/18/2008. Is this auto formating the same as just typing the full date in?
I renamed the item. The code does not have any run time errors. The code still references #N/A in the lookup field. Using the watch, I know that I am referencing the correct sheet. A1:B42 are the correct fields in the sheet. I am guessing that 2 is telling it to retrieve the information from...
this is the new line. I used the name that was available in the properties tab of visual basic.
sLookupReturn = Application.VLookup(TheDateValue, Sheets("Sheet10").[A1:B42].CurrentRegion, 2, False)
now that I have made these changes, the debugger says subscript out of range. Integer.
If I...
I modified the code, to this. It does the #N/A. I want A1:B42, maybe I placed it at the wrong place.
The watch on this says,
a1, b42, Date, Lookup, and CurrentRegion are Expressions not defined in Context
Sheets says it is Out of context
sLookupReturn = Application.VLookup(TheDateValue...
Thankyou I got the error message to go away. It keeps saying #N/A, so I think "...[A1].Currentregion,2,false)" might be wrong. I am unable to find any reference material on this command. I could adjust it to fit my workbook if I knew what it was doing. What is that line of code telling my...
I modifyed the code to include "TheDateValue = Date", but it is still getting hung up at "sLookupReturn = Application.VLookup(TheDateValue, Sheets("Sheet10").[A1].CurrentRegion, 2, False)" with "Run-time error '9', subscript out of range".
Private Sub Worksheet_Change(ByVal Target As...
thank you Skip, I included the line into my code. I although there is some trouble shooting required, I am much closer than before.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column < 7 Then
ThisRow = Target.Row
If Range("H" & ThisRow).Value = "" Then...
I have a code that will automatically put the date i start a new row. It works, but I would like this code to also do a lookup based on the date and return details about the date. A regular lookup doesn't work for me because each entry I make is a new row.
For example If I were to use the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.