dezibluenose
New Member
- Joined
- Oct 6, 2021
- Messages
- 12
- Office Version
- 365
- Platform
- Windows
Hi all. Looking for some help with this issue and also to improve my abysmal excel knowledge here.
Last year, I created a formula in my work to allow us to check if a customer existed on one of our two tracker files. We had a main file with customer numbers and the formula would use a vlookup in the first log and if it got no results it would check the second log or return nothing.
This was the formula I used:-
=IFERROR(IF(VLOOKUP(A1,'[Home Log Year 1.xlsm]Main'!$B:$V,20,0)=0,"",
VLOOKUP(A1,'[Home Log Year 1.xlsm]Main'!$B:$V,20,0)),
IF(VLOOKUP(A1,'[Away Log Year 1.xlsm]main'!$B:$V,17,0)=0,"",
VLOOKUP(A1,'[Away Log Year 1.xlsm]main'!$B:$V,17,0)))
This was working perfectly - if it couldn't find details in the Home log it checked the Away log and if still nothing was found it returned blank.
I've now been asked to also include checks on the logs for year 2. I'm showing my ignorance here but I figured I could just carry on my IF statement and add the links to year 2, however, when I do that I get the message "You've entered too many arguments for this function". The new formula I'm trying is at the bottom of my post.
I'm obviously missing something here - like I need to connect the searches with an OR statement - or is it simply that I can't do this kind of search over 4 different files? I did try searching here and on line but I'm getting nowhere. Any help anyone can provide to tell Me what I'm doing wrong here would be much appreciated.
New Formula:-
=IFERROR(IF(VLOOKUP(A1,'[Home Log Year 1.xlsm]Main'!$B:$V,20,0)=0,"",
VLOOKUP(A1,'[Home Log Year 1.xlsm]Main'!$B:$V,20,0)),
IF(VLOOKUP(A1,'[Away Log Year 1.xlsm]Main'!$B:$V,17,0)=0,"",
VLOOKUP(A1,'[Away Log Year 1.xlsm]Main'!$B:$V,17,0)),
(IF(VLOOKUP(A1,'[Home Log Year 2.xlsm]Main'!$B:$U,20,0)=0,"",
VLOOKUP(A1,'[Home Log Year 2.xlsm]Main'!$B:$U,20,0)),
IF(VLOOKUP(A1,'[Away Log Year 2.xlsm]Main'!$B:$R,17,0)=0,"",
VLOOKUP(A1,'[Away Log Year 2.xlsm]Main'!$B:$R,17,0))))
Last year, I created a formula in my work to allow us to check if a customer existed on one of our two tracker files. We had a main file with customer numbers and the formula would use a vlookup in the first log and if it got no results it would check the second log or return nothing.
This was the formula I used:-
=IFERROR(IF(VLOOKUP(A1,'[Home Log Year 1.xlsm]Main'!$B:$V,20,0)=0,"",
VLOOKUP(A1,'[Home Log Year 1.xlsm]Main'!$B:$V,20,0)),
IF(VLOOKUP(A1,'[Away Log Year 1.xlsm]main'!$B:$V,17,0)=0,"",
VLOOKUP(A1,'[Away Log Year 1.xlsm]main'!$B:$V,17,0)))
This was working perfectly - if it couldn't find details in the Home log it checked the Away log and if still nothing was found it returned blank.
I've now been asked to also include checks on the logs for year 2. I'm showing my ignorance here but I figured I could just carry on my IF statement and add the links to year 2, however, when I do that I get the message "You've entered too many arguments for this function". The new formula I'm trying is at the bottom of my post.
I'm obviously missing something here - like I need to connect the searches with an OR statement - or is it simply that I can't do this kind of search over 4 different files? I did try searching here and on line but I'm getting nowhere. Any help anyone can provide to tell Me what I'm doing wrong here would be much appreciated.
New Formula:-
=IFERROR(IF(VLOOKUP(A1,'[Home Log Year 1.xlsm]Main'!$B:$V,20,0)=0,"",
VLOOKUP(A1,'[Home Log Year 1.xlsm]Main'!$B:$V,20,0)),
IF(VLOOKUP(A1,'[Away Log Year 1.xlsm]Main'!$B:$V,17,0)=0,"",
VLOOKUP(A1,'[Away Log Year 1.xlsm]Main'!$B:$V,17,0)),
(IF(VLOOKUP(A1,'[Home Log Year 2.xlsm]Main'!$B:$U,20,0)=0,"",
VLOOKUP(A1,'[Home Log Year 2.xlsm]Main'!$B:$U,20,0)),
IF(VLOOKUP(A1,'[Away Log Year 2.xlsm]Main'!$B:$R,17,0)=0,"",
VLOOKUP(A1,'[Away Log Year 2.xlsm]Main'!$B:$R,17,0))))