• 469K Members
• 4,508 Online
• 568K Conversations

## Excel - IF function or complex V Look-up

Occasional Contributor

# Excel - IF function or complex V Look-up

Dear all,

I am struggling to pull data from a cell from one tab into another tab. I am not sure if the right function is V Look-up or IF function?

The value needs to correspond with a certain country, product name, measure and year. I currently receive these files from different countries so I cannot change the layout too much. I have attached an example with dummy data to see can anyone help me.

Thanks

5 Replies

# Re: Excel - IF function or complex V Look-up

Hi Mark,

That could be like

`=IFERROR(INDEX('COUNTRY X BRAND DATA SHEET'!\$C\$4:\$F\$2000,MATCH(1,INDEX((\$A4='COUNTRY X BRAND DATA SHEET'!\$A\$4:\$A\$2000)*(\$B4='COUNTRY X BRAND DATA SHEET'!\$B\$4:\$B\$2000),1,0),0),MATCH(\$E4,'COUNTRY X BRAND DATA SHEET'!\$C\$2:\$F\$2,0)),"")`

and attached

# Re: Excel - IF function or complex V Look-up

Hi Sergei,

Thank you very much for replying.

Think you have cracked it. I have added in another country and tried to drag the formula down but it is now not that simple. Is there anywhere in your formula I need to change in order to change country.

Thanks again!

# Re: Excel - IF function or complex V Look-up

Hi Mark,

Sorry for the misprint in formula, it shall be zero instead of 1 at the end of inner INDEX (in red here)

`=IFERROR(INDEX('COUNTRY X BRAND DATA SHEET'!\$C\$4:\$F\$2000,MATCH(1,INDEX((\$A4='COUNTRY X BRAND DATA SHEET'!\$A\$4:\$A\$2000)*(\$B4='COUNTRY X BRAND DATA SHEET'!\$B\$4:\$B\$2000),0,0),0),MATCH(\$E4,'COUNTRY X BRAND DATA SHEET'!\$C\$2:\$F\$2,0)),"")`

and attached

# Re: Excel - IF function or complex V Look-up

Hi Sergei,

Thank you very much for emailing me back and for helping me with the formula.

I am new to complex IF functions like this so I will be very much studying your formula over the next few days. If I have any other formula questions would you be willing to help me again?

Many thanks,

Mark.

# Re: Excel - IF function or complex V Look-up

Hi Mark,

Yes, sure, however don't promise immediate answer.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies