Test_Spreadsheet.xlsx
Hi
I have a spreadsheet where I need one formula to use for every cell in column E as the data will change every day. I currently have an IF statement which I am using to find duplicate values in Col A to sum all the values together from col D.
=IF(COUNTIF(A:A,A2)=COUNTIF($A$2:A2,A2),SUMIF(A:A,A2,D:D),"")
This formula works perfectly for all of my values that have a trans type of TCASH. However, I need it to be a little more specific for the trans type TEFT. For example, the TEFT trans store code will come across with either just 01 added to the end of the store code and sometimes a second code will come across with 02.
For example you can see in the attachment that Store 1001, 1002 & 1003 have 2 values with either 01 added to the end or 02. All the stores that only have one value will just have 01 added.
Now what I need is to modify this formula to do all the above but with the condition that if it finds value 100101 & 100102 that it adds these together. The same applies for 100201 & 100202. However it will not apply to 100301 & 100302, which I need to keep separate. I have highlighted the values in different colours to make it easier to see (there will be no colour coding on the actual spreadsheet).
Is this possible?
Thanks
Bookmarks