Forum Discussion

Dennis Oo's avatar
Dennis Oo
Copper Contributor
Sep 20, 2017

I need a (custom?) function that returns several values to one cell

Hi. I'm pretty much new to excel and I need a (custom?) function that returns several values to one cell:

 

- I have a file (File1) with product codes in column B
- I have a second file (File2) with corresponding product codes in column C
- I need the function applied to some cells of File1, column F (somewhere in the range of cell F2 to like F1000)

 

The result should be obtained in File2, from the row (RowX) that contains the corresponding product code

 

- IF cell F(RowX) is empty -> return "B2C CO Not Set"
- IF cell H(RowX) contains string "true" -> return "Set as Not Sold"
- IF cell I(RowX) contains string "true" -> return "Set as Not Sold B2C"
- IF cell J(RowX) is 0 -> return "B2C Price Not Set"

 

preferably in one cell (so in cell Fx of File1) like:

 

B2C CO Not Set
Set as Not Sold
Set as Not Sold B2C
B2C price Not Set

 

Or, if not possible, like: NoCO, NS, NS B2C, NO€

 

ELSE, no return.


I figured I could start by arranging a return for value of F(RowX), and came to this:

 

INDEX([FILENAME.XLS]Sheet1!$C:$C,0);MATCH(B2,[FILENAME.XLS]Sheet1!$C:$C,0);6)

 

but I have no clue if it's correct or useful or how to proceed if it would return the correct value. After taking three hours to write the one line, I realised I'm missing basic skills..

 

HELP! :)

 

Thanks in advance,

Dennis

3 Replies

No RepliesBe the first to reply

Resources