spectacularstuff
New Member
- Joined
- May 9, 2006
- Messages
- 40
Hello,
I have an issue I cannot seem to figure out. I would like to program this in excel vs. a macro due to the amount of adjustments I make to the sheet every week. I need to add something on to my current programming.
I currently have two working columns and 1 working functional cell in the following question.
Column E
Column F
Cell F46
Column E is for people to put an X in to tell Excel to add up the value in the cell in the same row in Column F.
In the below example cell F46 would add up $55.00 + $145.00 because someone put an X in the adjacent cell in Column E.
(This has been shortened. There are 41 rows in the real programming)
I use the following code in order to accomplish this:
(The below code also adds 7% tax if an X is in the appropriate spot)
I want to add another Column (Column D) that I can enter a number in such as 2 or 4 or 9, etc etc etc and excel will then look to see if there is an X in the range of cells for column E.
If there is an X, it will then look to see if there is a number in range of cells for column D.
If there is a number in column D then it will mulitply that number times the value in the cell in the same row for column F as follows:
If there is not a number in Column D, it will automatically presume 1.
(This has been shortened. There are 41 rows in the real programming)
Can this be accomplished? How?
Thanks for any insight into this issue.
Wayne
I have an issue I cannot seem to figure out. I would like to program this in excel vs. a macro due to the amount of adjustments I make to the sheet every week. I need to add something on to my current programming.
I currently have two working columns and 1 working functional cell in the following question.
Column E
Column F
Cell F46
Column E is for people to put an X in to tell Excel to add up the value in the cell in the same row in Column F.
In the below example cell F46 would add up $55.00 + $145.00 because someone put an X in the adjacent cell in Column E.
(This has been shortened. There are 41 rows in the real programming)
Code:
E F
$125.00
X $ 55.00
$125.00
$150.00
$600.00
X $145.00
$ 75.00
F46 =$200.00
(The below code also adds 7% tax if an X is in the appropriate spot)
Code:
=IF(SUMPRODUCT(--($E$4:$E6="X")),(SUMPRODUCT(--($E$4:$E45="X"),F$4:F45)+SUMPRODUCT(--($E$4:$E45="X"),F$4:F45)*0.07),SUMPRODUCT(--($E$4:$E45="X"),F$4:F45))
If there is an X, it will then look to see if there is a number in range of cells for column D.
If there is a number in column D then it will mulitply that number times the value in the cell in the same row for column F as follows:
If there is not a number in Column D, it will automatically presume 1.
(This has been shortened. There are 41 rows in the real programming)
Code:
Example 1
D E F
$125.00
2 X $ 55.00
$125.00
$150.00
$600.00
X $145.00
$ 75.00
F46 = $255.00
Code:
Example 2
D E F
$125.00
2 X $ 55.00
$125.00
$150.00
$600.00
2 X $145.00
$ 75.00
F46 = $400.00
Can this be accomplished? How?
Thanks for any insight into this issue.
Wayne