Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Formula 1

Status
Not open for further replies.

arvarr

MIS
Nov 24, 2009
260
0
0
AU
Hi
I'm trying to populate from column D to S with value from column B.

Criteria:
1. If Period (column A3:A14) = Period (column D1:S1), then insert value (number of times as per column C across columns)

Attached is the raw data with results i am trying to achieve.

Thanks,
arv
 
 https://files.engineering.com/getfile.aspx?folder=87f894e1-dab7-4b66-9dd7-97b903041194&file=Test1.xlsx
Arv,

I think that unless you INSERT a column (D), you'll have a circular reference.

My formula
E21: =IF($A21>E$19,0,IF($A21=E$19,$B21,IF(SUM($D21:D21)<$B21*$C21,$B21,0)))

You can make the ZEROs disappear using a Conditional Format.

URL]


Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!
 
Here's your workbook.

BTW, if...
E1: 31-Jan-2023
...then...
F1: =DATE(YEAR(E1),MONTH(E1)+2,0)-1
...and COPY/PASTE across

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!
 
 https://files.engineering.com/getfile.aspx?folder=4aeccae1-2874-476e-9d1f-17b4f7669293&file=Test1.xlsx
Thanks Skip. Awesome.

What if I have date 31-January-2021 in cell A15?

The expected outcome is 0.

Thanks,
arv
 
You didn't include a requirement for a date previous to the minimum date in the display range.

You'll have to wait until the Super Bowl is over--ie. Probably tomorrow.o

Why don't you take a crack at it.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!
 
Hi Skip
I think I can add another column to overcome this problem.

I just realized I will have negative numbers in column B and the formula needs to be adjusted.

Thanks,
arv
 
Revised formula
if
Column A Period less than min Row 1 period OR
Column A Period greater than than max Row 1 period OR
then result is ZERO.

Accommodated negative amounts.

=IF(OR($A3>E$1,$A3<MIN($1:$1),$A3>MAX($1:$1)),0,IF($A3=E$1,$B3,IF(ABS(SUM($D3:D3))<ABS($B3*$C3),$B3,0)))

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!
 
In between snaps.🫡🏈

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!
 
Yikes, the only issue is when its a negative amount, it extends more than the # of times.
 
Accommodated negative amounts.
If negative amount. It only shows in one column.

=IF(OR($A3>E$1,$A3<MIN($1:$1),$A3>MAX($1:$1)),0,IF($A3=E$1,$B3,IF(ABS(SUM($D3:D3))<$B3*$C3),$B3,0)))


I tried adding Abs below but it extends more than # Of times.

=IF(OR($A3>E$1,$A3<MIN($1:$1),$A3>MAX($1:$1)),0,IF($A3=E$1,$B3,IF(ABS(SUM($D3:D3))<ABS($B3*$C3),$B3,0)))

Thanks,
arv
 
Try this

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!
 
 https://files.engineering.com/getfile.aspx?folder=c3fe7b5a-ec51-4879-8bf3-8252581f630b&file=Test1.xlsx
Thanks heaps. I had one closing bracket in the sum section and 2 closing brackets after.

I shall leave you to enjoy the game.

Much appreciated 👍👍👍.

Regards
arv
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top