ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   IF STATEMENT HELP (https://www.excelbanter.com/excel-discussion-misc-queries/236397-if-statement-help.html)

ksummers

IF STATEMENT HELP
 
What I have, some duplicate ID's and some non-duplicate ID's. Need to sum the
amount from two rows and identify the duplicate record in a new column
ID Hours Qtr Gross Qtr
00293 0.50 30.50
00337 170.40 10,574.39
00337 124.00 7,642.49
00443 190.25 12,131.18
00443 132.00 8,140.27
00467 14.00 854.05
00467 3.00 184.27
00913 710.75 45,124.94
00913 166.00 10,242.38
01234 3.55 220.18

What I want

ID Hours Qtr Gross Qtr Grand Total Gross By ID
00293 0.50 30.50 30.5
00337 170.40 10,574.39 18216.88
00337 124.00 7,642.49 Duplicate
00443 190.25 12,131.18 20271.45
00443 132.00 8,140.27 Duplicate
00467 14.00 854.05 1038.32
00467 3.00 184.27 Duplicate
00913 710.75 45,124.94 55367.32
00913 166.00 10,242.38 Duplicate
01234 3.55 220.18 220.18

Any suggestions?

evoxfan

IF STATEMENT HELP
 
Here is a thought until a better solution comes along.

1.Add a column that has duplicate in every cell beside your data table.
2.Use VLOOKUP formula in the empty end column to identify duplicates by
searching only for items above it. If it finds the item have it give you the
value of the column with duplicates in it. If it does not find a duplicated
number you get an error message.
3.Then insert the column where you want your added sums or "duplicate"
listed. 4.Here insert an "if" formula that equals "Duplicate" if it finds it
in the VLOOKUP column or sums items for a tota if it does not find
"Duplicate".
5.Hide the columns you do not want in your report before printing.

Hope this helps.

"ksummers" wrote:

What I have, some duplicate ID's and some non-duplicate ID's. Need to sum the
amount from two rows and identify the duplicate record in a new column
ID Hours Qtr Gross Qtr
00293 0.50 30.50
00337 170.40 10,574.39
00337 124.00 7,642.49
00443 190.25 12,131.18
00443 132.00 8,140.27
00467 14.00 854.05
00467 3.00 184.27
00913 710.75 45,124.94
00913 166.00 10,242.38
01234 3.55 220.18

What I want

ID Hours Qtr Gross Qtr Grand Total Gross By ID
00293 0.50 30.50 30.5
00337 170.40 10,574.39 18216.88
00337 124.00 7,642.49 Duplicate
00443 190.25 12,131.18 20271.45
00443 132.00 8,140.27 Duplicate
00467 14.00 854.05 1038.32
00467 3.00 184.27 Duplicate
00913 710.75 45,124.94 55367.32
00913 166.00 10,242.38 Duplicate
01234 3.55 220.18 220.18

Any suggestions?


Teethless mama

IF STATEMENT HELP
 
Try this:

=IF(COUNTIF($A$2:A2,A2)=1,SUMIF($A$2:$A$11,A2,$C$2 :$C$11),"Duplicate")

copy down


"ksummers" wrote:

What I have, some duplicate ID's and some non-duplicate ID's. Need to sum the
amount from two rows and identify the duplicate record in a new column
ID Hours Qtr Gross Qtr
00293 0.50 30.50
00337 170.40 10,574.39
00337 124.00 7,642.49
00443 190.25 12,131.18
00443 132.00 8,140.27
00467 14.00 854.05
00467 3.00 184.27
00913 710.75 45,124.94
00913 166.00 10,242.38
01234 3.55 220.18

What I want

ID Hours Qtr Gross Qtr Grand Total Gross By ID
00293 0.50 30.50 30.5
00337 170.40 10,574.39 18216.88
00337 124.00 7,642.49 Duplicate
00443 190.25 12,131.18 20271.45
00443 132.00 8,140.27 Duplicate
00467 14.00 854.05 1038.32
00467 3.00 184.27 Duplicate
00913 710.75 45,124.94 55367.32
00913 166.00 10,242.38 Duplicate
01234 3.55 220.18 220.18

Any suggestions?


ksummers

IF STATEMENT HELP
 
You are a genius, thank you very much !!!!

"Teethless mama" wrote:

Try this:

=IF(COUNTIF($A$2:A2,A2)=1,SUMIF($A$2:$A$11,A2,$C$2 :$C$11),"Duplicate")

copy down


"ksummers" wrote:

What I have, some duplicate ID's and some non-duplicate ID's. Need to sum the
amount from two rows and identify the duplicate record in a new column
ID Hours Qtr Gross Qtr
00293 0.50 30.50
00337 170.40 10,574.39
00337 124.00 7,642.49
00443 190.25 12,131.18
00443 132.00 8,140.27
00467 14.00 854.05
00467 3.00 184.27
00913 710.75 45,124.94
00913 166.00 10,242.38
01234 3.55 220.18

What I want

ID Hours Qtr Gross Qtr Grand Total Gross By ID
00293 0.50 30.50 30.5
00337 170.40 10,574.39 18216.88
00337 124.00 7,642.49 Duplicate
00443 190.25 12,131.18 20271.45
00443 132.00 8,140.27 Duplicate
00467 14.00 854.05 1038.32
00467 3.00 184.27 Duplicate
00913 710.75 45,124.94 55367.32
00913 166.00 10,242.38 Duplicate
01234 3.55 220.18 220.18

Any suggestions?



All times are GMT +1. The time now is 07:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com