IF statement using 2 lookup table columns

IF statement using 2 lookup table columns

mark.j.eaken
Contributor Contributor
1,077 Views
2 Replies
Message 1 of 3

IF statement using 2 lookup table columns

mark.j.eaken
Contributor
Contributor

i have two columns i want to use in a lookup table using a if statement and greater than. 

if(nominal diameter >4", column A, column B) is  what i kind of looking for

if greater than 4" than column A if not then use column B

i'm not sure how to write it.

this is what i think it should be but doesnt work

if(Nominal Diameter >4",size_lookup(Lookup Table Name,"TO2"),size_lookup(Lookup Table Name,"TO1")))

 

0 Likes
1,078 Views
2 Replies
Replies (2)
Message 2 of 3

ceyhunyuzuak
Advocate
Advocate

just in order to give it a try I placed this formula into one of pipe elbow family and it works as intended

 

if(Nominal Diameter < 80 mm, size_lookup(Lookup Table Name, "FID", 1.08 * Nominal Diameter + 5.2 mm, Nominal Diameter), size_lookup(Lookup Table Name, "BOD", 1.08 * Nominal Diameter + 5.2 mm, Nominal Diameter))

 

maybe you might want to consider to upload your family so I can take a look what's wrong with it.

also in your formula it seems Lookup Table function is missing 2 out of 4 (at least) variables.

on the other hand you can combine several lookup table into one lookup table so you can use your formula search multiple variables through single lookup table.

Message 3 of 3

iainsavage
Mentor
Mentor

I might be wrong but I’m pretty sure that you can’t use a size range for the lookup value and that it has to be a distinct value which matches the value in the lookup column(s).

This link might help.

https://forums.autodesk.com/t5/revit-mep-forum/some-tricks-with-this-lookup-table/m-p/6877957

 

I think it would be easier to edit the lookup table so that the found value in the rows for 1”, 2” etc up to 4” will have the A value and sizes 5”, 6” etc will have the B value, the A and B values being in the same column on the appropriate rows.

0 Likes