Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to copy a Cell Content automatically IF G12 cell <""
I am having the below Macro code for moving the cursor E11,F11,E12,G11 & G12
and these cells are not protected and rest all other cells are locked (Other than M11 cell). I got this code in google web search. Now I want to add a small condition which is if a person enter any value in G12 cell then the Macro should automatically do copy the M11 cell. Thats all. M11 cell is not having any lock! Note:- The Cursor should move in this order only that is E11,F11,E12,G11 & G12. So please dont change the cursor movement. The cursor should not move to M11 cell and all. Private Sub Worksheet_Change(ByVal Target As Range) Select Case Target.Address Case "$E$11" Range("F11").Select Case "$F$11" Range("E12").Select Case "$E$12" Range("G11").Select Case "$G$11" Range("G12").Select End Select End Sub The above coding pasted in Sheet Tab. I am not having any knowledge in creating the macro. So, please help me. -------------------- (Ms-Exl-Learner) -------------------- |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to copy a Cell Content automatically IF G12 cell <""
You haven't specified the destination of copying M11!
If you mean that in this case M11 is to be copied into G12 then Private Sub Worksheet_Change(ByVal Target As Range) Select Case Target.Address Case "$E$11" Range("F11").Select Case "$F$11" Range("E12").Select Case "$E$12" Range("G11").Select Case "$G$11" Range("G12").Select Case "$G$12" Range("G12") = Range("M11") End Select End Sub If you meant something else, please, clarify! -- Regards! Stefi €žMs-Exl-Learner€ť ezt Ă*rta: I am having the below Macro code for moving the cursor E11,F11,E12,G11 & G12 and these cells are not protected and rest all other cells are locked (Other than M11 cell). I got this code in google web search. Now I want to add a small condition which is if a person enter any value in G12 cell then the Macro should automatically do copy the M11 cell. Thats all. M11 cell is not having any lock! Note:- The Cursor should move in this order only that is E11,F11,E12,G11 & G12. So please dont change the cursor movement. The cursor should not move to M11 cell and all. Private Sub Worksheet_Change(ByVal Target As Range) Select Case Target.Address Case "$E$11" Range("F11").Select Case "$F$11" Range("E12").Select Case "$E$12" Range("G11").Select Case "$G$11" Range("G12").Select End Select End Sub The above coding pasted in Sheet Tab. I am not having any knowledge in creating the macro. So, please help me. -------------------- (Ms-Exl-Learner) -------------------- |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to copy a Cell Content automatically IF G12 cell <""
Thanks for your reply. I need to give some more input to my earlier message.
E11 Value will be entered F11 Value will be entered E12 Value will be entered G11 Value will be entered G12 Value will be entered After entering a value in G12 (last cell) I have made a formula in M11 which will check all the values which is entered in E11,F11,E12,G11 & G12 and get a Result From Next sheet. Every time people used get the result M11 cell and type the derived result and type it manually in another application. Because I have given rights to access only the above 5 cells (E11,F11,E12,G11 & G12) all other cells including M11 is protected. In protection method I have restricted the users to select LOCKED cells. So people cannot able to do copy on M11 cell and paste the result in another application. So I require the macro just to do copy (M11 Cell) when the final cell of G12 cell is getting entered with any character. If the macro is started to do that Cntrl+C in M11 then after entering the value in G12 cell people can directly give the Cntrl+V in another application since the copy work is already done by the macro. But the cursor should not Move to M11 Cell after entering G12 cell. It should move only in the five cells (E11,F11,E12,G11 & G12). Hope it's clear now. -------------------- (Ms-Exl-Learner) -------------------- "Stefi" wrote: You haven't specified the destination of copying M11! If you mean that in this case M11 is to be copied into G12 then Private Sub Worksheet_Change(ByVal Target As Range) Select Case Target.Address Case "$E$11" Range("F11").Select Case "$F$11" Range("E12").Select Case "$E$12" Range("G11").Select Case "$G$11" Range("G12").Select Case "$G$12" Range("G12") = Range("M11") End Select End Sub If you meant something else, please, clarify! -- Regards! Stefi €žMs-Exl-Learner€ť ezt Ă*rta: I am having the below Macro code for moving the cursor E11,F11,E12,G11 & G12 and these cells are not protected and rest all other cells are locked (Other than M11 cell). I got this code in google web search. Now I want to add a small condition which is if a person enter any value in G12 cell then the Macro should automatically do copy the M11 cell. Thats all. M11 cell is not having any lock! Note:- The Cursor should move in this order only that is E11,F11,E12,G11 & G12. So please dont change the cursor movement. The cursor should not move to M11 cell and all. Private Sub Worksheet_Change(ByVal Target As Range) Select Case Target.Address Case "$E$11" Range("F11").Select Case "$F$11" Range("E12").Select Case "$E$12" Range("G11").Select Case "$G$11" Range("G12").Select End Select End Sub The above coding pasted in Sheet Tab. I am not having any knowledge in creating the macro. So, please help me. -------------------- (Ms-Exl-Learner) -------------------- |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to copy a Cell Content automatically IF G12 cell <""
On dec. 14, 11:48, Ms-Exl-Learner wrote:
Thanks for your reply. *I need to give some more input to my earlier message. E11 Value will be entered F11 Value will be entered E12 Value will be entered G11 Value will be entered G12 Value will be entered After entering a value in G12 (last cell) I have made a formula in M11 which will check all the values which is entered in E11,F11,E12,G11 & G12 and get a Result From Next sheet. * Every time people used get the result M11 cell and type the derived result and type it manually in another application. *Because I have given rights to access only the above 5 cells (E11,F11,E12,G11 & G12) all other cells including M11 is protected. In protection method I have restricted the users to select LOCKED cells. *So people cannot able to do copy on M11 cell and paste the result in another application. So I require the macro just to do copy (M11 Cell) when the final cell of G12 cell is getting entered with any character. * If the macro is started to do that Cntrl+C in M11 then after entering the value in G12 cell people can directly give the Cntrl+V in another application since the copy work is already done by the macro. *But the cursor should not Move to M11 Cell after entering G12 cell. *It should move only in the five cells (E11,F11,E12,G11 & G12). Hope it's clear now. -------------------- (Ms-Exl-Learner) -------------------- "Stefi" wrote: You haven't specified the destination of copying M11! If you mean that in this case M11 is to be copied into G12 then Private Sub Worksheet_Change(ByVal Target As Range) * * *Select Case Target.Address * * * * Case "$E$11" * * * * * * *Range("F11").Select * * * * Case "$F$11" * * * * * * *Range("E12").Select * * * * Case "$E$12" * * * * * * *Range("G11").Select * * * * Case "$G$11" * * * * * * Range("G12").Select * * * * Case "$G$12" * * * * * * Range("G12") = Range("M11") * * *End Select End Sub If you meant something else, please, clarify! -- Regards! Stefi „Ms-Exl-Learner” ezt írta: I am having the below Macro code for moving the cursor E11,F11,E12,G11 & G12 and these cells are not protected and rest all other cells are locked (Other than M11 cell). *I got this code in google web search. * Now I want to add a small condition which is if a person enter any value in G12 cell then the Macro should automatically do copy the M11 cell. *That’s all. M11 cell is not having any lock! * Note:- The Cursor should move in this order only that is E11,F11,E12,G11 & G12. *So please don’t change the cursor movement. *The cursor should not move to M11 cell and all. Private Sub Worksheet_Change(ByVal Target As Range) * * *Select Case Target.Address * * * * Case "$E$11" * * * * * * *Range("F11").Select * * * * Case "$F$11" * * * * * * *Range("E12").Select * * * * Case "$E$12" * * * * * * *Range("G11").Select * * * * Case "$G$11" * * * * * * Range("G12").Select * * *End Select End Sub The above coding pasted in Sheet Tab. I am not having any knowledge in creating the macro. So, please help me. -------------------- (Ms-Exl-Learner) --------------------- Idézett szöveg elrejtése - - Idézett szöveg megjelenítése - Maybe this: Private Sub Worksheet_Change(ByVal Target As Range) Select Case Target.Address Case "$E$11" Range("F11").Select Case "$F$11" Range("E12").Select Case "$E$12" Range("G11").Select Case "$G$11" Range("G12").Select Case "$G$12" Range("M11").Copy End Select End Sub Just after entering value in G12, Paste (Ctrl+V) in the other application! Regards, Stefi |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to copy a Cell Content automatically IF G12 cell <""
Wow Thanks a lot!!! Its working fine€¦.
-------------------- (Ms-Exl-Learner) -------------------- "Stefi" wrote: On dec. 14, 11:48, Ms-Exl-Learner wrote: Thanks for your reply. I need to give some more input to my earlier message. E11 Value will be entered F11 Value will be entered E12 Value will be entered G11 Value will be entered G12 Value will be entered After entering a value in G12 (last cell) I have made a formula in M11 which will check all the values which is entered in E11,F11,E12,G11 & G12 and get a Result From Next sheet. Every time people used get the result M11 cell and type the derived result and type it manually in another application. Because I have given rights to access only the above 5 cells (E11,F11,E12,G11 & G12) all other cells including M11 is protected. In protection method I have restricted the users to select LOCKED cells. So people cannot able to do copy on M11 cell and paste the result in another application. So I require the macro just to do copy (M11 Cell) when the final cell of G12 cell is getting entered with any character. If the macro is started to do that Cntrl+C in M11 then after entering the value in G12 cell people can directly give the Cntrl+V in another application since the copy work is already done by the macro. But the cursor should not Move to M11 Cell after entering G12 cell. It should move only in the five cells (E11,F11,E12,G11 & G12). Hope it's clear now. -------------------- (Ms-Exl-Learner) -------------------- "Stefi" wrote: You haven't specified the destination of copying M11! If you mean that in this case M11 is to be copied into G12 then Private Sub Worksheet_Change(ByVal Target As Range) Select Case Target.Address Case "$E$11" Range("F11").Select Case "$F$11" Range("E12").Select Case "$E$12" Range("G11").Select Case "$G$11" Range("G12").Select Case "$G$12" Range("G12") = Range("M11") End Select End Sub If you meant something else, please, clarify! -- Regards! Stefi €žMs-Exl-Learner€ť ezt Ă*rta: I am having the below Macro code for moving the cursor E11,F11,E12,G11 & G12 and these cells are not protected and rest all other cells are locked (Other than M11 cell). I got this code in google web search. Now I want to add a small condition which is if a person enter any value in G12 cell then the Macro should automatically do copy the M11 cell. Thats all. M11 cell is not having any lock! Note:- The Cursor should move in this order only that is E11,F11,E12,G11 & G12. So please dont change the cursor movement. The cursor should not move to M11 cell and all. Private Sub Worksheet_Change(ByVal Target As Range) Select Case Target.Address Case "$E$11" Range("F11").Select Case "$F$11" Range("E12").Select Case "$E$12" Range("G11").Select Case "$G$11" Range("G12").Select End Select End Sub The above coding pasted in Sheet Tab. I am not having any knowledge in creating the macro. So, please help me. -------------------- (Ms-Exl-Learner) --------------------- IdĂ©zett szöveg elrejtĂ©se - - IdĂ©zett szöveg megjelenĂ*tĂ©se - Maybe this: Private Sub Worksheet_Change(ByVal Target As Range) Select Case Target.Address Case "$E$11" Range("F11").Select Case "$F$11" Range("E12").Select Case "$E$12" Range("G11").Select Case "$G$11" Range("G12").Select Case "$G$12" Range("M11").Copy End Select End Sub Just after entering value in G12, Paste (Ctrl+V) in the other application! Regards, Stefi . |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to copy a Cell Content automatically IF G12 cell <""
Thank you for the below macro code and it's working fine.......
-------------------- (Ms-Exl-Learner) -------------------- "Stefi" wrote: You haven't specified the destination of copying M11! If you mean that in this case M11 is to be copied into G12 then Private Sub Worksheet_Change(ByVal Target As Range) Select Case Target.Address Case "$E$11" Range("F11").Select Case "$F$11" Range("E12").Select Case "$E$12" Range("G11").Select Case "$G$11" Range("G12").Select Case "$G$12" Range("G12") = Range("M11") End Select End Sub If you meant something else, please, clarify! -- Regards! Stefi €žMs-Exl-Learner€ť ezt Ă*rta: I am having the below Macro code for moving the cursor E11,F11,E12,G11 & G12 and these cells are not protected and rest all other cells are locked (Other than M11 cell). I got this code in google web search. Now I want to add a small condition which is if a person enter any value in G12 cell then the Macro should automatically do copy the M11 cell. Thats all. M11 cell is not having any lock! Note:- The Cursor should move in this order only that is E11,F11,E12,G11 & G12. So please dont change the cursor movement. The cursor should not move to M11 cell and all. Private Sub Worksheet_Change(ByVal Target As Range) Select Case Target.Address Case "$E$11" Range("F11").Select Case "$F$11" Range("E12").Select Case "$E$12" Range("G11").Select Case "$G$11" Range("G12").Select End Select End Sub The above coding pasted in Sheet Tab. I am not having any knowledge in creating the macro. So, please help me. -------------------- (Ms-Exl-Learner) -------------------- |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to copy a Cell Content automatically IF G12 cell <""
On dec. 15, 07:29, Ms-Exl-Learner wrote:
Thank you for the below macro code and it's working fine....... -------------------- (Ms-Exl-Learner) -------------------- "Stefi" wrote: You haven't specified the destination of copying M11! If you mean that in this case M11 is to be copied into G12 then Private Sub Worksheet_Change(ByVal Target As Range) * * *Select Case Target.Address * * * * Case "$E$11" * * * * * * *Range("F11").Select * * * * Case "$F$11" * * * * * * *Range("E12").Select * * * * Case "$E$12" * * * * * * *Range("G11").Select * * * * Case "$G$11" * * * * * * Range("G12").Select * * * * Case "$G$12" * * * * * * Range("G12") = Range("M11") * * *End Select End Sub If you meant something else, please, clarify! -- Regards! Stefi „Ms-Exl-Learner” ezt írta: I am having the below Macro code for moving the cursor E11,F11,E12,G11 & G12 and these cells are not protected and rest all other cells are locked (Other than M11 cell). *I got this code in google web search. * Now I want to add a small condition which is if a person enter any value in G12 cell then the Macro should automatically do copy the M11 cell. *That’s all. M11 cell is not having any lock! * Note:- The Cursor should move in this order only that is E11,F11,E12,G11 & G12. *So please don’t change the cursor movement. *The cursor should not move to M11 cell and all. Private Sub Worksheet_Change(ByVal Target As Range) * * *Select Case Target.Address * * * * Case "$E$11" * * * * * * *Range("F11").Select * * * * Case "$F$11" * * * * * * *Range("E12").Select * * * * Case "$E$12" * * * * * * *Range("G11").Select * * * * Case "$G$11" * * * * * * Range("G12").Select * * *End Select End Sub The above coding pasted in Sheet Tab. I am not having any knowledge in creating the macro. So, please help me. -------------------- (Ms-Exl-Learner) --------------------- Idézett szöveg elrejtése - - Idézett szöveg megjelenítése - In return for your help in e-mail notification matter! You are welcome! Thanks for the feedback! Stefi |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Splitting out Content in 1 cell (which is currently separated by"ALT-ENTER") into multiple cells | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
How to format a cell to make it blank if it's content is "N/A" | Excel Worksheet Functions | |||
When I type "BVE" in a cell, it automatically chanegs to"BE"..Why | Excel Discussion (Misc queries) | |||
Cond Format & helper-cell based "duplicate rec" tricked by content | Excel Discussion (Misc queries) |