i'm hitting a wall! how do i force an action?

cdchambers

New Member
Joined
Feb 4, 2005
Messages
4
i'm not even sure if you can do this, but i'm new to excel so it's possible this is really easier than I am making it.

In A1, if the Answer is "yes" - jump to cell C1.
In A1, if the answer is "NO" - jump to cell D1.

If that is not possible, is it possible to do this -

In A1, if answer is "Yes" - highlight cell c1
in a1, if answer is "No" - highlight cell d1.

BEST CASE ANSWER - COMBINE BOTH !!!!!

thanks for help! (GO EAGLES!!)

~Catherine
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Catherine, welcome to the board,
The second part of your question is do-able - Conditional formating.

In cell C1
Format|Conditional format - choose "formula is" =IF(A1="Yes",TRUE,FALSE) then pick your format, the same goes for D1 (change yes to no)

or, do you mean highlight the cell to become active?

Colin.
 
Upvote 0
thanks for responding

what i want is for the cell to become a color, such as yellow, to alert the person filling in the form to go to the highlighted cell.

So in a1, if the answer is yes, I want c1 to become yellow. if in a1 the answer is no, i want d1 to become yellow.

does that make sense?
 
Upvote 0
Both could be done...I'm thinking with some VBA code. As far as I know (though, there could be a way) you can't jump to another cell depending on the results of a formula. I've been wrong before, however....

Anyway, as rs2k said, one answer to your problem would involve conditional formatting. You can set it up like this:

Go to cell C1, and from the Format menu, select Conditional Formatting. Select Formula Is from the dropdown, and enter the following formula: =UPPER(A1)="YES"
Choose a format and hit OK.

Likewise, in D1, and use this formula: =UPPER(A1)="NO"
Choose a format and hit OK.

I used the UPPER function just in case the user enters "yes" or "Yes" or "YES," you will get the same results. Hope that helps! Post back if you need more help or if you'd like to see a VBA code solution. (Just thought I'd throw that out there, conditional formatting should do just fine.)
 
Upvote 0
Only because it's what was asked for first...
(And only if the value(s) yes or no in A1 are not the results of a formula...)
You could right click the sheet tab, choose view code and paste this in the white area on the right. (Then press AltQ to close the VB Editor).
Now when either yes or no gets entered into A1, C1 or D1 (respectively) will get selected.


<font face=Courier New><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Worksheet_Change(<SPAN style="color:#00007F">ByVal</SPAN> Target <SPAN style="color:#00007F">As</SPAN> Range)
<SPAN style="color:#00007F">If</SPAN> Target.Address <> "$A$1" <SPAN style="color:#00007F">Then</SPAN> <SPAN style="color:#00007F">Exit</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
<SPAN style="color:#00007F">If</SPAN> [A1] = "" <SPAN style="color:#00007F">Or</SPAN> Target.Count > 1 <SPAN style="color:#00007F">Then</SPAN> <SPAN style="color:#00007F">Exit</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
<SPAN style="color:#00007F">If</SPAN> UCase(Target.Value) = "YES" <SPAN style="color:#00007F">Then</SPAN> [C1].Select
<SPAN style="color:#00007F">If</SPAN> UCase(Target.Value) = "NO" <SPAN style="color:#00007F">Then</SPAN> [D1].Select
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>


(If A1 is in fact the return of a formula, post back. We can get around that too.)

Hope it helps,
Dan
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,818
Members
449,049
Latest member
cybersurfer5000

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