Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

2 values in vlookup formula on excel

RichardAlt
8 - Asteroid

Hi Guys,

 

My question is about the formula in Excel.

When I ran my workflow it will output the data in excel.

My problem is I don't know how to vlookup using 2 values.

 

I have 2 sheets, 

The fund name sheet and data sheet.

Fund name sheet is something like this.

Fund NameDateAmount 1Amount 2Amount 3Amount4
Sample Fund Name 19/1/2020    
Sample Fund Name 19/2/2020    
Sample Fund Name 19/3/2020    
Sample Fund Name 19/4/2020    
Sample Fund Name 19/5/2020    

 

And my data sheet is something like this.

Fund NameDateAmount 1Amount 2Amount 3Amount4
Sample Fund Name 19/1/202011,22323,44323,55512,231
Sample Fund Name 29/1/202012,223235,243425,52323,344
Sample Fund Name 39/1/202013,223447,043827,49134,457
Sample Fund Name 49/1/202014,223658,8431,229,45945,570
Sample Fund Name 59/1/202015,223870,6431,631,42756,683
Sample Fund Name 19/2/2020132,2234,417,0438,274,491344,557

 

I need to lookup the data from Data Sheet to Fund Name using Fund Name column and Date column.

 

I want something like this,

Fund NameDateAmount 1Amount 2Amount 3Amount4
Sample Fund Name 19/1/202011,22323,44323,55512,231
Sample Fund Name 19/2/2020132,2234,417,0438,274,491344,557
Sample Fund Name 19/3/2020    
Sample Fund Name 19/4/2020    
Sample Fund Name 19/5/2020    

 

Thank you!

4 REPLIES 4
ChrisTX
16 - Nebula
16 - Nebula

It sounds like you can use a Join tool, using the Fund Name and Date as join fields.

 

Chris

RichardAlt
8 - Asteroid

Hi, @ChrisTX  Thanks!,

 

But I don't what to use alteryx tool to do this. My output file is already formatted with color, column width, and etc. I've already tried to check the preserve formatting option but still, it ruined the formatting.

ChrisTX
16 - Nebula
16 - Nebula

So you've already run the workflow and it created an Excel file, and you don't want to re-run the workflow?

 

Your solution is to manually add a VLookup in Excel?  This board might not be the best place to ask about an Excel formula.

 

But....if you want to use a VLookup with the data stored in two separate columns .... first - in both data sets - create a single column that concatenates the two separate columns.  You might need to convert your Date to text before concatenating the two fields into one.  Then make sure you sort the tab that holds the source values.  Then use the single field in both datasets for the VLookup formula.

 

Chris

vizAlter
12 - Quasar

Hi @RichardAlt  —  As I could understand that now you need Excel Formula for the Excel Output from Alteryx workflow:

 

Refer to attached the solution (I have used this formula in Cell C2 then pasted on other cells):

 

=IFERROR(LOOKUP(2,1/(Data!$A:$A='Update Fund'!$A2)/(Data!$B:$B='Update Fund'!$B2),Data!C:C),0)

 

 

vizAlter_0-1600276306003.png

 

FYI - This kind of formulas increase the calculation time.

 

(Disclaimer - I am not sure if users are allowed to ask such questions, other than Alteryx)

 

 

If it resolves your query please mark it "Solved" or "Solved" with a Like. This will help other users find the same answer/resolution.  Thank you.

Labels
Top Solution Authors