IF A1=BLUE

weh2oski

New Member
Joined
Sep 26, 2002
Messages
16
if a1 = Blue c1 should be B1-4
if a1 = green c1 should be B1-8
if a1 = yellow c1 should be B1-11
please help with setup
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

WillR

Well-known Member
Joined
Feb 18, 2002
Messages
1,143
On 2002-10-04 07:08, weh2oski wrote:
if a1 = Blue c1 should be B1-4
if a1 = green c1 should be B1-8
if a1 = yellow c1 should be B1-11
please help with setup

=IF(A1="Blue",B1-4,IF(A1="Green",B1-8,IF(A1="Yellow",B1-11,0)))

this should be placed in cell C1
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
On 2002-10-04 07:08, weh2oski wrote:
if a1 = Blue c1 should be B1-4
if a1 = green c1 should be B1-8
if a1 = yellow c1 should be B1-11
please help with setup

=B1-INDEX({4,8,11},MATCH(A1,{"Blue","Green","Yellow"},0))
 

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,458
I did miss something! :LOL: It's late!
This message was edited by Brian from Maui on 2002-10-04 07:13
 

WillR

Well-known Member
Joined
Feb 18, 2002
Messages
1,143
On 2002-10-04 07:12, WillR wrote:
On 2002-10-04 07:08, weh2oski wrote:
if a1 = Blue c1 should be B1-4
if a1 = green c1 should be B1-8
if a1 = yellow c1 should be B1-11
please help with setup

=IF(A1="Blue",B1-4,IF(A1="Green",B1-8,IF(A1="Yellow",B1-11,0)))

this should be placed in cell C1

i'm assuming that A1 contains the text values Blue,green or yellow & not actually formatted blue, green or yellow....

:)
 

Forum statistics

Threads
1,143,706
Messages
5,720,384
Members
422,282
Latest member
psunith

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
Top