Need If statement to compare two sets of data - stuck, sorry!

absandme

New Member
Joined
May 29, 2012
Messages
13
Hi.
I hate having to ask for help but I cannot work this out as the If statement is too long for my brain to cope with :confused:

I have two columns of data I need to compare.

Column A is old data, numerical (codes, eg 20183), rows 2 to 948

Column B is where I have tried to put the If statement.

Column C is where there is new numerical data (codes, eg 20183), rows 2 to 956


I need to
1 - if data was in old data, column A & also in new data, column C then column B should display the word "Edit"

Else:

2 - if data was in old data, column A but NOT in new data Column C then column B should display the word "Delete"

Else:

3 - if data was not in old data column A but is in New data, column C then column B should display the word "Add"


I think I'm right working it on the IF statement but I just cannot solve it, please help! :eek:

Many thanks in advance.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Thanks but I need to adjust it slightly.

My original If statement was:

=IF(ISNUMBER(MATCH(A2,$C$2:$C$956,0)),"TRUE","FAIL")

This meant that it would search the whole column for a match to be true/fail & then I changed it to Edit...... I then realised I needed to write an If statement with more information as the original question, Edit, Add & Delete but it needs to search the whole list of data.

Can I please have some more help?
Thanks :)
 
Upvote 0
i don't think you can do that in one column. If you use column B, starting with B2 to check that A2 is either in col C or not in Column C, you then need to use a different column to check if column C data is also in column A
 
Upvote 0

Forum statistics

Threads
1,203,059
Messages
6,053,299
Members
444,650
Latest member
bookendinSA

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top