#1
|
|||
|
|||
Excel - open workbook - function - value = 0
I have problem with my function.
I have function for selection (cell) from different sheets. This funcion I use in several sheets. My problem is with calculation for everything sheets Because function counts only ones sheet.. Other sheets is showing in cell 0. (Note after open workbook) Workbook must recalculation everything sheets after I see value for cell. Wher si problem? How to modify the function? if.. Do not have to recalculate the workbook when you open it? Thank you for answer. Function - save in module Function ID_NAMES(ID) ID_NAME = "!!!ERROR!!!" If ActiveSheet.Name = ActiveSheet.Name Then For ReqRow = 2 To 1000 CellOrder = CStr(ReqRow) SelectSellFromWorkbook = "B" & CellOrder If "Block function requirements" = Range(SelectSellFromWorkbook) Then Exit For End If Next ReqRow For CellOrderCnt = 2 To ReqRow CellOrder = CStr(CellOrderCnt) SelectSellFromWorkbook = "B" & CellOrder If Sheets("ATG").Range(SelectSellFromWorkbook) = ID Then SignalName = "C" & CellOrder ID_NAME = Sheets("ATG").Range(NAME) Exit For End If Next CellOrderCnt End If End Function |
#2
|
||||
|
||||
Wouldn't a simple formula like:
=VLOOKUP(C5,ATG!$B$2:$C$1000,2,FALSE) do it, where C5 is the cell containing the ID? Or if you wanted the same error message: =IFERROR(VLOOKUP(C5,ATG!$B$2:$C$35,2,FALSE),"!!!ERROR!!!") |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hyperlink function only fully works when referring workbook is open | batchmaster | Excel | 1 | 01-26-2018 12:27 PM |
Open Excel from MS Access and Password Protect Workbook | bconner | Excel Programming | 2 | 09-21-2017 02:32 AM |
How to add attached excel workbook with hyperlink in the same workbook | lynchbro | Excel Programming | 0 | 02-24-2015 01:29 PM |
Need to open an Excel WorkBook from Word VBA | Pierre-Hugues | Word VBA | 4 | 10-07-2013 06:27 AM |
Unable to open Excel 97-2003 workbook | J Partridge | Excel | 1 | 11-07-2010 03:26 AM |