Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I input these formulas into cells that I want written in?
If an employee input a dollar amount into G12, can I mandate he fill in what
the purpose was in A12? If he doesn't fill in the annotation in A12, then he has to remove the dollar amount in G12 before proceeding with the rest of the form. The highest dollar amount used in G12 would be $75. Want dollar amount in G12 Want text in A12 I can make it work outside my cells with Cell I formula =IF(AND(G120,A12=""),"Error"," ") Cell J formula =IF(AND(G120,A12=""),"Need to fill out column A","OK") How do I make it work inside my cells? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I input these formulas into cells that I want written in?
Enter the following Event macro in the workshet code area:
Private Sub Worksheet_Change(ByVal Target As Range) Set t = Target Set r1 = Range("G12") Set r2 = Range("A12") If Intersect(r1, t) Is Nothing Then Exit Sub If r2.Value < "" Then Exit Sub Application.EnableEvents = False t.Clear r2.Select Application.EnableEvents = True MsgBox ("Enter a reason in A12") End Sub Because it is worksheet code, it is very easy to install and use: 1. right-click the tab name near the bottom of the window 2. select View Code - this brings up a VBE window 3. paste the stuff in and close the VBE window If you save the workbook, the macro will be saved with it. To remove the macro: 1. bring up the VBE windows as above 2. clear the code out 3. close the VBE window To learn more about macros in general, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm To learn more about Event Macros (worksheet code), see: http://www.mvps.org/dmcritchie/excel/event.htm -- Gary''s Student - gsnu200822 "Paige" wrote: If an employee input a dollar amount into G12, can I mandate he fill in what the purpose was in A12? If he doesn't fill in the annotation in A12, then he has to remove the dollar amount in G12 before proceeding with the rest of the form. The highest dollar amount used in G12 would be $75. Want dollar amount in G12 Want text in A12 I can make it work outside my cells with Cell I formula =IF(AND(G120,A12=""),"Error"," ") Cell J formula =IF(AND(G120,A12=""),"Need to fill out column A","OK") How do I make it work inside my cells? |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I input these formulas into cells that I want written in?
You cannot put a formula into either A12 or G12 since this is where you want
to enter data. I would use conditional formatting. Select A12 and open the Conditional Formatting dialog; use the formula =AND(G1212, ISBLANK(A12) and set a bright red fill colour. For the $75 limit on G12 use Data Validation If you need help with either topic, please return -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "Paige" wrote in message ... If an employee input a dollar amount into G12, can I mandate he fill in what the purpose was in A12? If he doesn't fill in the annotation in A12, then he has to remove the dollar amount in G12 before proceeding with the rest of the form. The highest dollar amount used in G12 would be $75. Want dollar amount in G12 Want text in A12 I can make it work outside my cells with Cell I formula =IF(AND(G120,A12=""),"Error"," ") Cell J formula =IF(AND(G120,A12=""),"Need to fill out column A","OK") How do I make it work inside my cells? |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I input these formulas into cells that I want written i
I was able to get this line to work. It is what I wanted.
I have read the links you told me to read. I can't figure out how to make several lines do the same thing. I need this same code from G12 and A12 to G41 and A41 "Gary''s Student" wrote: Enter the following Event macro in the workshet code area: Private Sub Worksheet_Change(ByVal Target As Range) Set t = Target Set r1 = Range("G12") Set r2 = Range("A12") If Intersect(r1, t) Is Nothing Then Exit Sub If r2.Value < "" Then Exit Sub Application.EnableEvents = False t.Clear r2.Select Application.EnableEvents = True MsgBox ("Enter a reason in A12") End Sub Because it is worksheet code, it is very easy to install and use: 1. right-click the tab name near the bottom of the window 2. select View Code - this brings up a VBE window 3. paste the stuff in and close the VBE window If you save the workbook, the macro will be saved with it. To remove the macro: 1. bring up the VBE windows as above 2. clear the code out 3. close the VBE window To learn more about macros in general, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm To learn more about Event Macros (worksheet code), see: http://www.mvps.org/dmcritchie/excel/event.htm -- Gary''s Student - gsnu200822 "Paige" wrote: If an employee input a dollar amount into G12, can I mandate he fill in what the purpose was in A12? If he doesn't fill in the annotation in A12, then he has to remove the dollar amount in G12 before proceeding with the rest of the form. The highest dollar amount used in G12 would be $75. Want dollar amount in G12 Want text in A12 I can make it work outside my cells with Cell I formula =IF(AND(G120,A12=""),"Error"," ") Cell J formula =IF(AND(G120,A12=""),"Need to fill out column A","OK") How do I make it work inside my cells? |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I input these formulas into cells that I want written i
I can't get this one to work on the first line.
"Bernard Liengme" wrote: You cannot put a formula into either A12 or G12 since this is where you want to enter data. I would use conditional formatting. Select A12 and open the Conditional Formatting dialog; use the formula =AND(G1212, ISBLANK(A12) and set a bright red fill colour. For the $75 limit on G12 use Data Validation If you need help with either topic, please return -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "Paige" wrote in message ... If an employee input a dollar amount into G12, can I mandate he fill in what the purpose was in A12? If he doesn't fill in the annotation in A12, then he has to remove the dollar amount in G12 before proceeding with the rest of the form. The highest dollar amount used in G12 would be $75. Want dollar amount in G12 Want text in A12 I can make it work outside my cells with Cell I formula =IF(AND(G120,A12=""),"Error"," ") Cell J formula =IF(AND(G120,A12=""),"Need to fill out column A","OK") How do I make it work inside my cells? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Automatically use the newest number input in the formulas | Excel Discussion (Misc queries) | |||
how to account the number of cells which is bank and written? | Excel Discussion (Misc queries) | |||
Quickest way to input formulas? | Excel Discussion (Misc queries) | |||
Hidden rows unhide themselves when formulas are written | Excel Discussion (Misc queries) | |||
Formulas containing variable input | Excel Discussion (Misc queries) |