ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to calc an intersection (https://www.excelbanter.com/excel-programming/298999-macro-calc-intersection.html)

No Name

Macro to calc an intersection
 
I need to write a macro that calculates fringe in a
spreadsheet whenever Forecast and Fringe intersect.
A B C D
Jan Feb Mar
Account Actual Forecast Forecast
1 Salary 100,000 95,000 92,000
2 Fringe 28,000 +95,000* .2 +92,000*.2

The formula that I need in C2 and D2 is Salary *
FringeRate.

How can I write a macro that calculates this ... Whenever
Fringe and Forecast intersect calculate fringe in that
cell.


JWolf

Macro to calc an intersection
 
=IF(AND($A4="Fringe",C$2="Forecast"),C$3*0.2,"")
enter in C4 and copy paste elsewhere.
This assumes that row 1 and 2 have the month and account lines and your
actual data starts in line 3 for salary and 4 for fringe.

wrote:
I need to write a macro that calculates fringe in a
spreadsheet whenever Forecast and Fringe intersect.
A B C D
Jan Feb Mar
Account Actual Forecast Forecast
1 Salary 100,000 95,000 92,000
2 Fringe 28,000 +95,000* .2 +92,000*.2

The formula that I need in C2 and D2 is Salary *
FringeRate.

How can I write a macro that calculates this ... Whenever
Fringe and Forecast intersect calculate fringe in that
cell.


No Name

Macro to calc an intersection
 
I need to do it via a macro. For other reasons, I can't
have a formula in those cells.
-----Original Message-----
=IF(AND($A4="Fringe",C$2="Forecast"),C$3*0.2,"" )
enter in C4 and copy paste elsewhere.
This assumes that row 1 and 2 have the month and account

lines and your
actual data starts in line 3 for salary and 4 for fringe.

wrote:
I need to write a macro that calculates fringe in a
spreadsheet whenever Forecast and Fringe intersect.
A B C D
Jan Feb Mar
Account Actual Forecast Forecast
1 Salary 100,000 95,000 92,000
2 Fringe 28,000 +95,000* .2 +92,000*.2

The formula that I need in C2 and D2 is Salary *
FringeRate.

How can I write a macro that calculates this ...

Whenever
Fringe and Forecast intersect calculate fringe in that
cell.

.



All times are GMT +1. The time now is 11:45 AM.

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