indesignkat
Member
Sorry about the clunkiness of the title, was trying to be descriptive of the problem without guessing a solution.
I have a data table that is 28 columns and around 20,000 rows. Five of those columns represent currency that can be positive or negative. I want a single column that indicates if this row has both positive and negative amounts between those five currency columns. (for example: 0, -1, 5, 0, 0 would return "YES" while 0, 1, 0, 1, 1 would not) I got it to work by using a couple helper columns, one for debits and one for credits. The formula is simply '=COUNTIF($F2:$J2,">"&0)' for debits and the same but with a < for credits. Then my display column shows a text message if both debit and credit counts are above 0.
My problem arises when I update the worksheet. At the start of a new week I delete all the table rows and paste in updated data using paste values. When I do this, those countifs change from $F2:$J2 to $F2:$J20000, which makes the spreadsheet take ages to update until I remember to go in and fix the formulae to be 2s again.
I thought about using row() but I don't know how to get that to work inside a countif range. Using the table names instead of column letters causes the same problem.
While I'm at it, is there a cleaner way to get my desired end result of a column that indicates in one cell whether the currency columns have both positive and negative numbers on that row? Without using VBA?
Thanks,
idk
I have a data table that is 28 columns and around 20,000 rows. Five of those columns represent currency that can be positive or negative. I want a single column that indicates if this row has both positive and negative amounts between those five currency columns. (for example: 0, -1, 5, 0, 0 would return "YES" while 0, 1, 0, 1, 1 would not) I got it to work by using a couple helper columns, one for debits and one for credits. The formula is simply '=COUNTIF($F2:$J2,">"&0)' for debits and the same but with a < for credits. Then my display column shows a text message if both debit and credit counts are above 0.
My problem arises when I update the worksheet. At the start of a new week I delete all the table rows and paste in updated data using paste values. When I do this, those countifs change from $F2:$J2 to $F2:$J20000, which makes the spreadsheet take ages to update until I remember to go in and fix the formulae to be 2s again.
I thought about using row() but I don't know how to get that to work inside a countif range. Using the table names instead of column letters causes the same problem.
While I'm at it, is there a cleaner way to get my desired end result of a column that indicates in one cell whether the currency columns have both positive and negative numbers on that row? Without using VBA?
Thanks,
idk