match two columns in seperate sheets and add other two columns - excel

I have 2 excel spreadsheets in a single excel file. Both of these files have a Campaign Name column and sum_revenues column
My first problem is that I want to match the Campaign Name column in both the sheets and if they match then I want to add the sum_revenues value in the 1st spreadsheet to sum_revenues in the 2nd spreadsheet
I know that sumif or sumifs will be used but I do not know how I can apply them.
The output should be the addition of sum_revenues column in both the sheets based on the Campaign name matching criteria in the sum_final column which is present on the 2nd sheet.
I hope I am clear about the question but please let me know if there is any confusion.
Below is how sheet 1, Sheet 2 looks like.
Sheet 1:
Campaign Name sum_revenues
ABC 40
DEF 60
Sheet 2:
Campaign Name sum_revenues sum_final
ABC 30 70
GHI 10 0
Now please note that in Sheet 2 in which I want to output is that sum_final column has the sum_revenues added up from both the sheets because ABC is present in both the sheets and it should show 0 for those which do not match.

Try:
=IFERROR(VLOOKUP(A2,Sheet1!$A$2:$B$3,2,FALSE),0)+B2
Sheet 2 Images:

Below formula may help you, assuming that your sheet1 data available in column A & B and sheet 2 data available in Column D & E and finally F would be the result.
Type the formula
sumif(e:e,d:d,a:a)+sumif(a:a,d:d,b:b) +e3

Related

Excel matching cell value and date range

i'm working on some data checking and faced problem to ease my checking. Hope anyone here can help me
I've two sheet of data
Sheet 1
John 01.10.2017 10.10.2017 A
Chloe 10.10.2017 10.10.2017 B
Jess 20.11.2017 22.11.2017 C
John 12.10.2017 13.10.2017 D
Sheet 2
Name Date Result
John 01.10.2017 A
John 11.10.2017 #N/A
Chloe 10.10.2017 B
I need a formula to cater on Sheet 2, result column.
If sheet 2 name with date fall/collision in btw sheet 1 date range, excel could help show the result
note that name on sheet 1 maybe repeated with different date range, but sheet 2 i wish to check the name whether conllision with sheet 1 data
Appreciate if anyone can help
First you need to format your dates properly. Format them as date times etc.
Then in the sheet 2 results column have a function something like this:
=IF(AND(A1=Sheet1!A1, B1>=Sheet1!B1, B1<=Sheet1!C1),TRUE,FALSE)
This will return TRUE for John for instance.
You then extend this for the rest of your cases.

need to copy data from one sheet to another depending on a value of the first sheet

i have never used excel except for in college and well that was a while ago, what i have is 3 sheets sheet 1 contains all user information sheet 2 is company information and sheet 3 is company member information,
now what i need to do is this,
i need to loop through sheet 1 column K and search for what is not "Individual" then i need the value of sheet 1 column A and put that in sheet 3 column C
i also need the index of the same row that does not equal "Individual" and use that to grab the value of sheet 2 column A and put that in sheet 3 column B
hopefully that makes sense and is actually possible and any ideas would be greatly appreciated!

Compare 2 sheets in 2 csv and replace value from one to the other

I'm trying to compare two sheets in excel and if matching "A" value then copy the value in the "B" to the other "I".
Ex:
Compare
Sheet 1 column A to Sheet 2 column A, if the Alpha numbers match then copy the value in Sheet 1 colum B into Sheet 2 colum I.
I have reference number in both A in need to replace the old image url by the new image url.
I have over 15 000 items and I will have to do this everyday so any automation would be great.
I have 2 csv files.
Any help would be appreciated
Thanks!
In Sheet2 column I using formular:
=IF(A1=Sheet1!A1,Sheet1!B1,"Value_if_not_match")
Hope this can help

Find values on two colums on different sheets that don't match

I have two worksheets, both have a column called part number. I need to find only the rows from both sheets that are unique. So if sheet one has:
part number
------------
abc
def
ghi
jkl
and sheet 2 has:
part number
------------
abc
def
ghi
zzz
I need the results to be:
jkl
zzz
You could copy both lists to be in the same column and then advanced filter for unique values
in sheet #3 column A paste the following
=IF(ISERROR(VLOOKUP(Sheet2!$A1,Sheet1!$A$1:$A$4,1,FALSE)),Sheet2!$A1,"")
and in sheet #3 column B
=IF(ISERROR(VLOOKUP(Sheet1!$A1,Sheet2!$A$1:$A$4,1,FALSE)),Sheet1!$A1,"")
that will list values from sheet1 not found in sheet2 and vice versa.
hope that helps
A formula of this kind in each sheet (copied down to suit) should identify uniques with #N/A:
=MATCH(A2,Sheet4!A:A,0)

return multiple different values based on 2 criteria in excel

Hope you can help. I have 2 excel sheets that look like this:
Sheet1:
ID trnx Module
1 aj08 AA
2 aj08 AA
3 aj08 AA
1 CJ20 ps opex
1 CJ20 ps capex
2 cn22 HR
Sheet 2
ID trnx Module
1 aj08
2 aj08
1 ml81
3 aj08
2 cn22
1 cj20
1 cj20
3 mm02
The formula im using is
INDEX($G$2:$G$9,SMALL(IF(A2=$F$2:$F$9,ROW($F$2:$F$9)-MIN(ROW($F$2:$F$9))+1,"")&IF(C2=$H$2:$H$9,ROW($H$2:$H$9)-MIN(ROW($H$2:$H$9))+1,""),COUNTIF(A$2:A$2,A2)&COUNTIF(C$2:C$2,C2)))
I need "module" from sheet 2 to be populated based on matching ID and trnx, and if the ID matches but not the trnx, then it must that cell for module to "No Match".
The problem i am experiencing is that sheet 2 is populating the data incorrectly. For Example the second occurrence of ID "1" in sheet 2 is pulling out Module ps opex. it is suppose to be "No Match" since the trnx in sheet 2 is ml81.
please help!!! Thanks in advance:)
This won't address the part I asked in my comment where you have 'duplicate keys' but may help you anyway :
Since your key is really the combination of the Id and the trnx columns, I inserted a concatenated column (I used =CONCATENATE(trnx, "_", id) where those names refer to sheet locations, but you could just as readily concatenate in the other direction as well, or use some other delimiter. It's just to make a single key column (that we can sort on and search more easily.)
In sheet 2 I form the same key column from the values listed there, and then your module column becomes :
=IF(ISNA(VLOOKUP(I12,$C$10:$D$15,2,0)), "No Match", VLOOKUP(I12,$C$10:$D$15,2,0))
Where in that formula, I12 is the key cell we are looking up in sheet 2, and the absolute reference in the VLOOKUP is the data table in sheet 1.

Resources