Hallo rujo!
Zu Frage 1 kann ich nichts sagen. Ich mache noch mit der NX4 rum. Dort
geht sowas nicht.
Zu Frage 2:
Hier ein Ausschnitt aus der UG-Doku:
The following explains ug_cell_hlookup, which can apply to ug_cell_vlookup
In the ug_cell_hlookup function dialog:
Specify a spreadsheet = user must indicate from which xls file to perform the
lookup within.
Specify the lookup target = is the value to be found in the top row of the
specified table range. This can be a value, a reference, or a text string
(example: Bolts ; this looks for cell that contains the string "Bolts"; Top
row does not necessary mean First row).
Specify a table range = The range of cells to perform the lookup with
(example: A2:C4 ; this looks for cells from A2 to C4).
Specify the offset to the data cell =Once the column of the target is found;
the offset is the number of rows to move down for the return data.
Specify the kind of lookup in the table = This mode flag works for cases where
the table is numeric values and take effect when the target value falls
between two cells in the table. The mode is ignored for tables where the
target row or column contains text. The modes are:
0=Requires an exact match
1=Returns the higher cell
2=Returns the lower cell
3=Returns the closest cell
Below is an example to put this all together:
The content of D:\temp\Book3.xls is shown below:
| A B C
----------------------------------------------
1 | new old same
2 | Axles Bearings Bolts
3 | 4 7 10
4 | 5 8 11
5 | 6 9 12
Enter the dialog for the function ug_cell_hlookup:
Specify a spreadsheet = D:\temp\Book3.xls
Specify the lookup target = Bolts (this looks for cell that contains the
string "Bolts"; Top row does not necessary mean First row)
Specify a table range = A2:C5 (this looks for cells from A2 to C5, we're not
including row 1 because "Bolt" is in row 2)
Specify the offset to the data cell = 2 (this is the number of row to offset
from target)
Specify the kind of lookup in the table = 0
OK the dialog and following user defined expression named GTAC will show up:
GTAC=ug_cell_hlookup( "D:\temp\Book3.xls", "Bolts", "A2:C5", 2, 0 )
and its expression value is 11
More info on Specify a table range -
when you are using target from a row that is not the top row (say row 2 for
example), then you must set your range value such that the beginning of the
range is the same row as your target, so if we used A1 in the above examle, it
fails, because Excel is looking only in row 1 for your specified target value.
The correct range for above example would start from A2. According to Excel
help doc on HLOOKUP function, the row number of target must be the very top
row for range specification.
ug_cell_hlookup and ug_cell_vlookup
These are actually Microsoft Excel functions, additional info can be found in
Excel Help Doc, look for "HLOOKUP" and "VLOOKUP".
ug_cell_hlookup such also in der ersten Zeile des Suchbereiches nach einem Wert. Wird dieser gefunden so wird der Wert aus der Zelle ausgelesen die um den Offset-Wert weiter unten liegt.
ug_cell_vlookup such also in der ersten Spalte des Suchbereiches nach einem Wert. Wird dieser gefunden so wird der Wert aus der Zelle ausgelesen die um den Offset-Wert weiter rechts liegt.
------------------
Deine Wahrnehmung bestimmt deine Realität!
NDS
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP