need to compare data in one column to another...

whynot

Board Regular
Joined
Jun 27, 2009
Messages
118
Office Version
  1. 365
Platform
  1. Windows
Have data in columns a, b, c, and d. Want to compare if data in column a = column c. if it does subtract data in c from d. i have 57 lines of data.
thank you for the help.
1712689638286.png
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
What do you want it to do if a is not = c?
Excel Formula:
=IF(A1=C1,C1-D1)
 
Upvote 0
i need to compare the data in column A to all the range of data in column d and when there is a match subtract the data in cell b with data in cell e. The data column A and column D are the same but in different order. Sorry should have been more clear.
 
Upvote 0
What you're saying is inconsistent with the original post #1. Can you share the item data set with some expected results using XL2BB?
For example,
1) you said you have column A-D. Now you have A-E.
2) you said check if A=C, now it's A=D
 
Upvote 0
Apologize for the confusion. I am having problems with XL2BB. So i am hoping the following picture helps. I would like to compare the data in Column A with the data in Column E. The data is the same but sorted differently. When the data in the cells in column a match column E i would like to subtract the data in Column B from the data in Column F. For example, A3 matches E3 so i would like to subtract 14,460-13,988 and put the answer in column D. hope that makes sense. thank you for your help.

1712697633540.png
 
Upvote 0
Try this. Adjust your references.
Excel Formula:
=C3 - XLOOKUP(A3,$E$3:$E$60,$F$3:$F$60,,0)
 
Upvote 0

Forum statistics

Threads
1,215,242
Messages
6,123,830
Members
449,127
Latest member
Cyko

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