Hi,
I am the beginner of Excel Macro. I would like to prepare one macro template. Kindly find the below requirement and help me to develop.
My requirement is “Header Column Changed automatically when I choose drop down list value”.
For example – I have two drop down list values, such as Addition and Subtraction.
Sheet 1:
Cell B2 – Details and Cell C2 having drop down list (Addition and Subtraction)
From Range (Cell B4 to D4) should be header list (Need to Change based on the drop down list value selection)
Sheet2:
Header Value Data attached (Addition Header àRange (Cell A2 to A4) and Subtraction Header àRange (Cell B2 to B4))
If I choose the drop down list value(Shet1àCell àC2) as Addition then Header value should update as (Sheet1àCell Range(B4,C4 and D4)àA,B and C=A+B) from the sheet 2 Range(A2,A3 and A4).
If I choose the drop down list value(Shet1àCell àC2) as Subtraction then Header value should update as (Sheet1àCell Range(B4,C4 and D4)àA,B and C=A-B) from the sheet 2 Range(B2,B3 and B4).
The macro should run automatically when the drop down value is changed and it should update header fields.
Please let me know, If you need more clarification.
Thanks in advance!
Regards,
Arputharaj.V
Posts by Arputharaj
-
-
Re: Lock the cell value Column D based on the drop down list selection in Column C
Hi Streub,
Thanks for your rapid reply. Yes. If i change the value in column C as Yes then Column D only locked. Other Columns such as Column A and Column B should be editable even Column C also.
If you need any query regading this please feel free to ask me.
Regards,
Arputharaj
-
Hi,
I am the new learner of Excel VBA and I have searching many VBA Stuff's from our forum.
My Requirement for this new thread is Lock the cell Column D based on the drop down selection in Column C.
Please find the attached file for your reference. I would like to explain my requirement with more details.
This attached excel file having some header Std.No(Column A),Std.Name(Column B),Pass/Fails(Column C) and Remarks(Column D).
Column C (Pass/Fail) having drop down list Yes/No.
If i select in column C value as "Yes" then particular Column D cell only locked automatically except to lock the whole sheet.
For example: Column C2 value is Yes - Then lock the cell value only D2 and shade by some color. But, It should be editable for other cell values A2 and B2,C2.
If i select in column C value as "No" then particular Column D cell is free text for giving some remarks.
Immediate replys are very much appreciated.
Regards,
Arpu.
-
Hi,
I am the new learner for macro development. I would like to know how to add the macros in existing excel ribbons.
For example - I have a two macro codes. One is change the Date Format from DD.MM.YYYY to MM/DD/YYYY and another one is Date Format from MM/DD/YYYY to YYYYMMDD.
I want to execute the macro from the customize ribbon through Add in Buttons. Kindly see the attachment for your reference.
If you post any samples and teach those stuff, it will be very helpful. Please let me know if you need more clarification on this.
Regards,
Arputharaj.V
-
Re: Populate another cell based on selection in dropdown list
Hi Kiffar,
Please find the attached file for your output. Please let me know if you need more clarification on this.
Thanks!
Regards,
Arputharaj.V
-
Re: Data Validatin Drop down list based on Previous Cell value selection in drop down
Hi royUK,
Thanks for your reply!
IF possible, could you please work out with my sample data and attach the same with your output. That will be very helpful for me.
Sorry for the trouble. Thanks for your help in Advance!
Regards,
Arputharaj.V
-
Re: Populate another cell based on selection in dropdown list
Hi Kiffar,
First of all i cant download your sample data from rapidshare.com
Hence, I assume your query and please see my below anwser with sample working file.
Sheet1 -> As per your request Column B is name , Column C is list of Units and Column E is Value asociated with that unit.
Sheet2 -> Data of Sheet1
Here, I have used some function name and Indirect Function(=INDIRECT(B2))
Regards,
Arputharaj.V
-
-
Re: Data Validatin Drop down list based on Previous Cell value selection in drop down
Hi s76.vj
I have tried with IF function in Data Validation List (Source Field) using with name range. Its working. Gods Grace. But i would like to set this with VBA macro code.
Hence, I am looking forward your reply.
Regards,
Arputharaj.V
-
Re: Data Validatin Drop down list based on Previous Cell value selection in drop down
Quote from royUK;651381You shouldn't need VBA, just Named Ranges & the INDIRECT Function.
Hi royUK,
Thank for your reply!
I have tried with Indirect function already. The problem is I couldn't give a named range as D1 as you also aware that. So, i have tried with IF function in Source field. Its working now.
Regards,
Arputharaj.V
-
Re: Data Validatin Drop down list based on Previous Cell value selection in drop down
Quote from s76.vj;651373Arputharaj - We could do this with the help of formulas and named ranges too, is it ok, if i could send this file in the evening, with formula and also with vba?
Hi s76.vj,
Thanks for your instant reply!
Thats fine. Please share your solution in the evening.
Regards,
Arputharaj.V
-
Hi,
Sub:Data Validatin Drop down list based on Previous Cell value selection in drop down list through macro
Can any one have a sample macro code for this? Please find the attached file for your reference.
Let me explain on this attachment, I have Data for Districts, Block and Village details.
Eg - District D1 having 2 Blocks and 2 Villages. Such as D1 having B1 and B2 Blocks and V1 and V2 Villages.
If i choose The District D1 in cell A2 drop down list, Cell B2 only show the Drop down list Blocks B1 and B2, not for other District blocks. And also the Cell C2 only allow to select in the drop down list Village V1 and V2, Not for the other Villeges. The important thing is if i choose the cell A2(District Values D1 and D2) the macro should run automatically and give the output (mean enable to choose the blocks B1 and B2 at Cell B2 and Villages V1 and V2 at cell C2) for allow to Select the datas for user.
I much appreciated if any one help me immediately for getting this output.
Advance thanks for your help!Regards,
Arputharaj.V -
Re: Dependant Data Validation From Multiple Dropdown Boxes
Hi,
Can any one have a sample macro code for this? Please find the attached file for your reference.
Let me explain on this attachment, I have Data for Districts, Block and Village details.
Eg - District D1 having 2 Blocks and 2 Villages. Such as D1 having B1 and B2 Blocks and V1 and V2 Villages.
If i choose The District D1 in cell A2 drop down list, Cell B2 only show the Drop down list Blocks B1 and B2, not for other District blocks. And also the Cell C2 only allow to select in the drop down list Village V1 and V2, Not for the other Villeges.
I much appreciated if any one help me immediately for getting this output.
Advance thanks for your help!
Regards,
Arputharaj.V
Quote from ByTheCringe2;354285See the attachment. It's a bit rough and ready, but it works. I may be able to help with some extra features.