Group by amout but ignore negatives (1 Viewer)

Myriad_Rocker

Questioning Reality
Local time
Today, 11:29
Joined
Mar 26, 2004
Messages
166
How would I do this on a report? I want to group by a set of numbers, including negative, but ignore the negative number...

Like this...

123
123
123
-123

46
-46
46

2
2
2

14
-14

etc...
 

KenHigg

Registered User
Local time
Today, 12:29
Joined
Jun 9, 2004
Messages
13,327
Try wrapping it in an abs() fuction first - ?
 

Myriad_Rocker

Questioning Reality
Local time
Today, 11:29
Joined
Mar 26, 2004
Messages
166
Try wrapping it in an abs() fuction first - ?
I actually figured this out right after I asked...:eek:

The absolute formula works, too...but here's how I did it...and it maintains the formatting (not that I needed it).

If it was less than 0, multiply by -1. I did this on a column I tagged as a "sort" column. Then, in the report sorting, I sorted on that instead of the original number. This caused it to group all the numbers, regardless of negatives, in the same group. :rolleyes: Works...:D
 

Myriad_Rocker

Questioning Reality
Local time
Today, 11:29
Joined
Mar 26, 2004
Messages
166
Another question, though...how do I make the report NOT show the row if there's only one to show in that set?

Example: If I have a group of numbers like this:

12
12
12
13
13
14
15
15
15
15

I want to group the numbers like this, but leave out the row where the instance is only one...

12
12
12

13
13

15
15
15
15
 

Myriad_Rocker

Questioning Reality
Local time
Today, 11:29
Joined
Mar 26, 2004
Messages
166
Another question, though...how do I make the report NOT show the row if there's only one to show in that set?

Example: If I have a group of numbers like this:

12
12
12
13
13
14
15
15
15
15

I want to group the numbers like this, but leave out the row where the instance is only one...

12
12
12

13
13

15
15
15
15
Got this, too. Sorry everyone. I just created a query that counted the numbers and then brought that into my report and excluded all the rows that had a count of less than 2.

Maybe someone with the same question will happen on this and it will help them. :)
 

mama_jadaya

New member
Local time
Today, 09:29
Joined
May 24, 2010
Messages
1
Hello Myriad_Rocker,
can you please tell me how u did this in VBA plzz (a code snippet)

thank you.

I actually figured this out right after I asked...:eek:

The absolute formula works, too...but here's how I did it...and it maintains the formatting (not that I needed it).

If it was less than 0, multiply by -1. I did this on a column I tagged as a "sort" column. Then, in the report sorting, I sorted on that instead of the original number. This caused it to group all the numbers, regardless of negatives, in the same group. :rolleyes: Works...:D
 

Users who are viewing this thread

Top Bottom