VBA If Then Statement

jtbrolly

New Member
Joined
Aug 22, 2011
Messages
42
Hey guys,

Not that good with coding, trying to make an if-then statement basically saying if it says something in column c, then write this with this formatting in column a. I've been looking all over for the exact coding and can't seem to find how to do it. Would really appreciate any help.

Thanks,
Jimmy
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
=IF(C1="099","default","") This works fine for me but how do you incorporate multiple cells?
If all 3 cells (c1,c2,c3)="099","default"?
 
Upvote 0
=IF(C1="099","default","") This works fine for me but how do you incorporate multiple cells?
If all 3 cells (c1,c2,c3)="099","default"?

try

=IF(C1="099","default","") OR =IF(C2="099","default","") OR =IF(C3="099","default","")

or you can just copy the code down the page :)
 
Upvote 0
It's not the "or" i'm looking for it's if all 3 cells are the same then the last cell can be considered completed.

Example:
c1 is marked "done"
c2 is marked "done"
c3 is marked "done"

Once all 3 cells are marked "done" i want c4 to say "sheet completed"

Sorry about the mix up.
 
Upvote 0
It's not the "or" i'm looking for it's if all 3 cells are the same then the last cell can be considered completed.

Example:
c1 is marked "done"
c2 is marked "done"
c3 is marked "done"

Once all 3 cells are marked "done" i want c4 to say "sheet completed"

Sorry about the mix up.


Then replace the OR statement with AND. In C4:

=IF(AND(C1="done",C2="done",C3="done"),"sheet completed","")
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,820
Members
452,946
Latest member
JoseDavid

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