Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - IF statement 2

Status
Not open for further replies.

jewel

Technical User
May 23, 2001
158
NZ
hi all

I have three colums on one sheet and four on the second sheet.

1st sheet is master copy- has over 5,000 records.

what I want to do is match the 2nd sheet with the first and if a match bring in the 4th column or otherwise put a 0.

This is my code so far, but I just keep getting errors - can anyone help

=IF(A2+B2+C2='all years!A2:C2', "",D2,'all years!D2',D2="0")

ok now I have put this in the 4th column of my first sheet.

all years is my 2nd sheet.

any advice appreciated.

thanks
jewel
 
What specifically do you want to match?
The syntax for the EXCEL IF() formula is as follows:

[tt]=IF(test_condition, value_if_true, value_if_false)[/tt]

*cLFlaVA
----------------------------
A pirate walks into a bar with a huge ship's steering wheel down his pants.
The bartender asks, "Are you aware that you have a steering wheel down your pants?"
The pirate replies, "Arrrrr! It's driving me nuts!
 
thanks clflava

I need to match columns A:B:C in both cases.

in first sheet there will always be an entry as this is the master, 2nd sheet this is the one that shows only those that have been used - eg A:B:C and in column D will have say 10 or however many times the combination has been used.

cheers
jewel
 
jewel,


[tt]
=IF(ISNA(MATCH(A2+B2+C2,'all years'!A2:C2,0)),'all years'!D2,"")
[/tt]


Skip,
[sub]
[red]Be advised:[/red] [glasses]
Alcohol and Calculus do not mix!
If you drink, don't derive! [tongue][/sub]
 
thanks everyone for your help here, but I am having to rethink my solution. I think I have tackled this wrong and need to use a VLookup instead, so will give this a go and repost if I need further help.

thanks /Skip + CLFlava
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top