+ Reply to Thread
Results 1 to 6 of 6

#n/a

  1. #1
    Registered User
    Join Date
    10-02-2006
    Posts
    13

    #n/a

    Can someone please help,

    Is there any way to not show the error "#N/A" when a formula is waiting for criteria

    my formula is ;

    =INDEX(Supplier!$C$5:$C$505,MATCH(B12,Supplier!$A$5:$A$505,0),0)

    and works fine when i enter a line, but until i enter the line it shows #N/A and looks un professional

    Any ideas

    Kind Regards

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try

    =IF(ISNA(INDEX(Supplier!$C$5:$C$505,MATCH(B12,Supplier!$A$5:$A$505,0),0)),"",INDEX(Supplier!$C$5:$C$505,MATCH(B12,Supplier!$A$5:$A$505,0),0))

    VBA Noob

  3. #3
    Valued Forum Contributor
    Join Date
    12-16-2004
    Location
    Canada, Quebec
    Posts
    363
    Hi

    I never tested out. However, if you use the help from excel on Error.type you will find a workaround.

    ERROR.TYPE

    Returns a number corresponding to one of the error values in Microsoft Excel or returns the #N/A error if no error exists. You can use ERROR.TYPE in an IF function to test for an error value and return a text string, such as a message, instead of the error val

  4. #4
    Registered User
    Join Date
    10-02-2006
    Posts
    13

    Thanks

    Thanks guys, got it working using the ISNA command

    Got another problem for you if you would be so kind (i will catch you out)

    i have a spreadsheet for entering parts ordered

    simple list of parts, but would like a column to show the date ordered without entering it

    i.e. when i open sheet and enter a line i would like the date to automatically appear in say column F (to save time)

    but

    it needs to save it as that date so next time i go into the sheet it still shows that day and not the new day until i enter a new line on that day

    i was thinking along the lines of =now() but this only keeps the day that the shet is opened

    hopefully i made this clear

    any help would be appreciated

    kind regards

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,620
    Private Sub Worksheet_Change(ByVal Target As Range)
    Range("F" & ActiveCell.Row).Value = Format(Now(), "yyyy-mmm-dd")
    End Sub
    Ben Van Johnson

  6. #6
    Valued Forum Contributor
    Join Date
    12-16-2004
    Location
    Canada, Quebec
    Posts
    363
    Hi

    Here is a different flavor, but same result

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim qRow As Long
    Application.EnableEvents = False
    qRow = GetRow1()
    Worksheets("Sheet1").Cells(qRow, 6) = Format(Now(), "dd-mm-yyyy")
    Application.EnableEvents = True
    End Sub

    Private Function GetRow1()
    GetRow1 = Worksheets("Sheet1").Range("A65536").End(xlUp).Row '+ 1
    'MsgBox GetRow1
    End Function

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1