copy text in col L based on a no. in colCY

It is impossible to offer a solution based on they limited information you have provided. Please supply more detail, using full sentences.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

i have text data in col 'L' . In Col "CY' there is numerical data. I want to pickup the text in col 'L' corresponding to a numerical value in Col "CY' in cell CY1.

Ex

Col L CY

* I want to copy text in col L corresponding

abc 1 to a number in Col Cy eg.2 in cell cy1

wse 2 'wse' in this case

xyz 5

awe 3

Let's say you start with this: L CY 1 2 abc 1 3 wse 2 4 xyz 5 5 awe 3This formula will return the value from Column L corresponding to the number in CY1, assuming that the number is found in CY2:CY5. If it isn't, the formula will return #N/A.

=INDEX(L2:L5,MATCH(CY1,CY2:CY5,0),1)

The INDEX function returns the value from the array L2:L5 based on the

row_numandcolumn_numarguments.The MATCH function is used to determine the

row_numargument by matching the value in CY1 within the array CY2:CY5.The #N/A can be eliminated with an IF(ISNA( function.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Ask Your Question

Weekly Poll

Do you think third-party cookies should be blocked by browsers?

Discuss in The Lounge

Poll History