Return double amount in case cell is colored (w/o VBA)

Mandy_84

Board Regular
Joined
May 29, 2017
Messages
71
Hi all! is that possible to use formula and determine the color at the same time without VBA? For example, Column B has following formula "=IF(MONTH(A1)+1=MONTH(TODAY()),"50","")", but let's say that row 2 and 3 is yellow, so I need the formula to show double of 50 (100), but still based on the formula that catches only last month entries.


[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][TABLE="width: 126"]
<tbody>[TR="class: outer_border"]
[TD="width: 126, align: right"]8/31/2017[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][TABLE="width: 126"]
<tbody>[TR="class: outer_border"]
[TD="width: 126, align: right"]8/3/2017[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][TABLE="width: 126"]
<tbody>[TR="class: outer_border"]
[TD="width: 126, align: right"]8/31/2017[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][TABLE="width: 126"]
<tbody>[TR="class: outer_border"]
[TD="width: 126, align: right"]8/31/2017[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][TABLE="width: 126"]
<tbody>[TR="class: outer_border"]
[TD="width: 126, align: right"]7/31/2017[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Thanks
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
are these cells coloured based on any conditional format rules
 
Upvote 0
are they always row 2 and 3
or can it be any row

note "50" is entered as text and NOT a number , you just need 50

=IF(AND(MONTH(A1)+1=MONTH(TODAY()),OR(ROW()=2,ROW()=3)),100,IF(MONTH(A1)+1=MONTH(TODAY()),50,0))
 
Upvote 0
Call up the Name Manager dialog box (Formulas tab, Defined Names panel, Name Manager button). Click the New button when the dialog box appears... put IsYellow in the Name field and then put this formula in the "Refers to" field...

=GET.CELL(63,OFFSET(INDIRECT("RC",FALSE),0,-1))

and finish off by clicking the OK button followed by click the Close button. Now, but this formula in cell B1 and copy it down...

=IF(MONTH(A1)+1=MONTH(TODAY()),IF(IsYellow,100,50),"")
 
Upvote 0
are they always row 2 and 3
or can it be any row

note "50" is entered as text and NOT a number , you just need 50

=IF(AND(MONTH(A1)+1=MONTH(TODAY()),OR(ROW()=2,ROW()=3)),100,IF(MONTH(A1)+1=MONTH(TODAY()),50,0))

It can be any row, not only 2,3. Hence any row can be colored, meaning it should return 100, instead of 50
 
Upvote 0
Call up the Name Manager dialog box (Formulas tab, Defined Names panel, Name Manager button). Click the New button when the dialog box appears... put IsYellow in the Name field and then put this formula in the "Refers to" field...

=GET.CELL(63,OFFSET(INDIRECT("RC",FALSE),0,-1))

and finish off by clicking the OK button followed by click the Close button. Now, but this formula in cell B1 and copy it down...

=IF(MONTH(A1)+1=MONTH(TODAY()),IF(IsYellow,100,50),"")
Sorry, I gave you the wrong formula for the "Refers to" field, use this instead...

=GET.CELL(63,OFFSET(INDIRECT("RC",FALSE),0,-1))=6
 
Upvote 0
Call up the Name Manager dialog box (Formulas tab, Defined Names panel, Name Manager button). Click the New button when the dialog box appears... put IsYellow in the Name field and then put this formula in the "Refers to" field...

=GET.CELL(63,OFFSET(INDIRECT("RC",FALSE),0,-1))

and finish off by clicking the OK button followed by click the Close button. Now, but this formula in cell B1 and copy it down...


=IF(MONTH(A1)+1=MONTH(TODAY()),IF(IsYellow,100,50),"")



U r a monster of Excel! thanks a ton! works!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,021
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top