ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Return 1 of 3 different values based on multiple cells (https://www.excelbanter.com/excel-programming/440689-return-1-3-different-values-based-multiple-cells.html)

Susan in Sacramento

Return 1 of 3 different values based on multiple cells
 
Need Formula or macro to allocate the "Scheduled hours" based on Group Counts:

If Group "A" and "C" are both greater than 1, then Scheduled "A" and "C"
should both be 6 hours
If Group "A" and "C" are equal to or less than 0, then Scheduled "A" and "C"
should both be 0 hours
If Group "A" greater than 1, and Group "C" is equal to 0, then Scheduled "A"
should 12 hours
If Group "C" greater than 1, and Group "A" is equal to 0, then Scheduled "C"
should 12 hours

What should be returned for Scheduled Hours
Group Count Scheduled Hours
A B A B
1047 1192 6 6
0 995 0 12
1752 0 12 0
0 0 0 0
0 0 0 0


--
Thanks - Suze

Don Guillett[_2_]

Return 1 of 3 different values based on multiple cells
 
Not very clear on your desires
If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Susan in Sacramento" wrote in
message ...
Need Formula or macro to allocate the "Scheduled hours" based on Group
Counts:

If Group "A" and "C" are both greater than 1, then Scheduled "A" and "C"
should both be 6 hours
If Group "A" and "C" are equal to or less than 0, then Scheduled "A" and
"C"
should both be 0 hours
If Group "A" greater than 1, and Group "C" is equal to 0, then Scheduled
"A"
should 12 hours
If Group "C" greater than 1, and Group "A" is equal to 0, then Scheduled
"C"
should 12 hours

What should be returned for Scheduled Hours
Group Count Scheduled Hours
A B A B
1047 1192 6 6
0 995 0 12
1752 0 12 0
0 0 0 0
0 0 0 0


--
Thanks - Suze



Gary Brown[_5_]

Return 1 of 3 different values based on multiple cells
 
Answered in the 'Worksheet Functions' forum
--
Gary Brown



"Susan in Sacramento" wrote:

Need Formula or macro to allocate the "Scheduled hours" based on Group Counts:

If Group "A" and "C" are both greater than 1, then Scheduled "A" and "C"
should both be 6 hours
If Group "A" and "C" are equal to or less than 0, then Scheduled "A" and "C"
should both be 0 hours
If Group "A" greater than 1, and Group "C" is equal to 0, then Scheduled "A"
should 12 hours
If Group "C" greater than 1, and Group "A" is equal to 0, then Scheduled "C"
should 12 hours

What should be returned for Scheduled Hours
Group Count Scheduled Hours
A B A B
1047 1192 6 6
0 995 0 12
1752 0 12 0
0 0 0 0
0 0 0 0


--
Thanks - Suze



All times are GMT +1. The time now is 06:46 AM.

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