Run A Macro Based On Value Input In A Cell

Jul 19, 2006

I am using data validation to restrict the number of Characters a user can input in a range of cells. The number of characters in this however can vary based on which selection they selected in a different cell.

To put this as an example, if the user selects "hello" in cell a1, the data validation would allow 10 letters in the cell range c1:c20. If the person selects "goodbye" in cell a1, then the validation would only allow 7 characters in cell range c1:c20. I have been using the worksheet Change function, however it updates the validation regardless of what cell is changed.

View 7 Replies


ADVERTISEMENT

Macro To Jump To A Specific Cell Based On User Input?

Apr 17, 2013

At the top of my spreadsheet, a day of the week is selected via Dropdown.

Below that in a table, the days of the week are split into hourly slots.

I want to write a macro to jump to the first cell in the bottom table containing the day selected in top cell.

View 9 Replies View Related

VBA Macro To Auto Change Cell Color On Protected Sheet Based On Input

Apr 13, 2009

I have a macro code for conditional formatting. The first 2 lines of the macro are


Private Sub Worksheet_Change(ByVal Target As Range) ....

View 9 Replies View Related

Macro To Unhide Columns Based On A Users Input

Apr 2, 2014

I'd like for my spreadsheet to open with only Column A visible; I'd like all other collumns to stay hidden.

I want to create a marco to unhide column(s) based on the value of an individual cell.

For example:

if I enter the number 5 into cell A1, I would like Columns B:F to unhide.
if I enter the number 2 into cell A1, I would like Columns B:C to unhide. Is this possible?

View 10 Replies View Related

Autoupdate Cell Comment Based On Cell Input / Dynamic Cell Comments?

Aug 16, 2013

I'm wondering if it is at all possible to have a cell comment automatically update depending on what data is input in the cell (via user input, VLOOKUP, etc.)?

For example, if cell A1 contains the text "CHARLES" with a comment saying "Employee of the Month", and is then subsequently updated with the new text "JOHN" (again, via direct input, a VLOOKUP, data validation, etc.) is there a way to have the comment automatically update to say something else, such as "Team Lead" for example?

I've considered using VBA to accomplish my goal, but am unsure how to compose an effective code to do so. I've also considered perhaps creating a named table filled with all the different comment possibilities I would like to have used in this cell and then inputting a formula in either cell A1, or the comment contained therein, that would then call the corresponding text from that table based on the data in cell A1. Honestly, I'm not sure that what I'm trying to do is even possible;

View 4 Replies View Related

Excel 2007 :: Restrict Cell Input Based On Another Cell Value

Jan 22, 2013

I am working in both 2003 and 2007 Excel.

This is a simplified version of my worksheet:

I have two cells, A2 and B2. When I enter a numeric value into B2, I want it only allowed when certain text values are in A2. I.E.: Allow any value in B2, but only if A1 is either "SYDN or "ADEL".

Now using info found in an old post, I can achieve this with a combination of data validation and code:
=OR(A2="SYDN",A2="ADEL") for the validation and for the code:

[Code] ......

The only problem is I also need to reset B2 if A2 changes to invalid data as a result of some other input to that cell (A2). In other words if B2 is showing "1" already and A2 were to change from "SYDN" to say "LOND", then B2 needs to be cleared. If A2 changed to "ADEL" then it doesn't need to clear but it is ok if it does because it is fine to re-enter "1" into B2 again.

I have attempted to attach a sample worksheet : Xl0000003.xls‎

View 4 Replies View Related

Change Result Cell Format Based On Input Cell Value

Mar 24, 2007

Macro Based on an input cell’s (e.g. B12) setting of “yes” or “no”, format several other cells (e.g. B20:G20, B23:F23, C26:J26) as follows: keep the existing yellow shading if input cell is “yes”, change to grey shading if input cell is “no”. I would like this macro to run automatically whenever the input cell value is changed.

View 2 Replies View Related

Formula For Cell Result Based On Other Cell Input

Sep 3, 2007

I'm trying to work out the way of having a cell give a result based on what has been input into two other cells.

Basically I'm doing up a risk management spreadsheet. I need to have in one cell the LIKELIHOOD of an incident, in the second cell, the CONSEQUENCES of it happening and ending up with a RISK MANAGEMENT ASSESSMENT in the third cell.

View 9 Replies View Related

Cell Values Based On Input Of Another Cell And Sheet

Apr 2, 2007

I want to tie the values of some cells on Sheet 2 to what's put in into corresponding cells on Sheet 1. Example

If Cell B3 on Sheet 1 has the string "B off" put in, Sheet 2 should automatically get "R1" in cell B12, "B off" in cell C12 and "ID123456" in cell D12. If cell B3 on Sheet 1 is empty, B12:D12 should be blank.

View 4 Replies View Related

Restrict Cell Input Based On Text Of Another Cell

Jan 29, 2008

I have two coloumns on a worksheet. In the first column I have data validation drop down list. I want to be able to: if the first column "Other" is chosen then the next cell will allow text for description, if anything other is chosen in the first drop down list cell then I want the next ( text for descritption ) cell to be resticted.

View 4 Replies View Related

Cell Based On Formula And Allow User Input?

Jan 13, 2010

Cell A5 has a Yes_No pull-down list for data validation. In cell B5, I want to display the value 0.002 only if A5 is "Yes". If A5 is "No", I want the user to be able to enter a number into the B5 cell without destroying the formula.

View 4 Replies View Related

Input Cell Value Based On Background Color?

Apr 2, 2012

I'm working on a sheet that gets filled in with background colors (red, light blue, and green) and I'm trying to come up with a way to automate the process of inputting the text in the red and blue fields (red always gets PROCESS and light blue always gets SHPD) but they end up in different locations in the same columns. is there a function or macro to make this happen? I have constructed a macro to compile the sheet from my online database as it is a live system.

MODELACTIONxxx1xxx2xxx3xxx4xxx5xxx6xxx7xxx8xxx9xxx10xxx11xxx12xxx13xxx14xxx15xxx16xxx17 This is a simplified version of what I'm working with, and i'm on Excel 2000

View 2 Replies View Related

Highlight Part Of Cell Based On Input

Oct 5, 2006

I want to track winning football teams by highlighting the victor. So lets say I have a cell that contains

Raiders @ Niners

and another cell containing "home" or "away" indicating the winner.

Based on the home/away cell, I want to either highlight Niners/Raiders.

View 4 Replies View Related

Excel 2010 :: Formula Based On YES / No Input In Another Cell

Apr 30, 2014

Two formulas which I need in Cells E74 and E75.

Basically the formulas will depend whether the entry in D73 are Yes or No

in cell E74, IF D73 = ‘No’ then E74 = D74 + E70 ELSE IF ‘D73’ = ‘Yes’ then E74 = E70

in cell E75, IF D73 = ‘No’ then E74 = D74 + E70 ELSE IF D73 = ‘Yes’ then E74 = E70

Excel version 2010

View 4 Replies View Related

Conditional Formatting Columns Based Off Cell Input

Jun 24, 2014

Instructions are in the attached excel as well. Please see attached

If a person puts in a price in column A, that results in column B "Everyday Price Per Unit" being greater than column C "NDP", then highlight column A cell input red.

=Column B>Column C, then turn input cells in Column A Red.

First four highlighted are examples of thise formula scenario

** All based off an input into column

How to use conditional formatting to do so???

Excel Conditional Formatting 06.24.14.xlsx‎

View 5 Replies View Related

Finding A Formula Based On Text Input Into A Particular Cell

Aug 22, 2014

I do data entry for a driveway company. I get addresses and phone numbers, and then call the people to offer services. I keep track of my calls on the spreadsheet, color coded for my results, green for leads, yellow for voicemail/no answer, and red for not interested.

I have formulas in cells M2 through M8 to give me my overall stats for the calls I have made, it filters them by color for leads, missed calls, and rejections, and a couple other stats (mostly for my own curiosity)

What I'm trying to add is the cells L10 to M13, I want to be able to input a date, for instance 8/15, and have it run the same stats, just for that day essentially. So, I need it to search the last 2 columns in the table for the text that I input into cell M10, and then run the color based formula on those cells, and total them up in the appropriate cells, M11, M12, and M13.

The 2 Stats tables are the same at the moment in the sample, as I only included one particular street that I have mapped, my actual table is nearly 3000 rows.

View 3 Replies View Related

Populate A Cell Based On Input From A Drop Down List

Jan 19, 2009

Various Numbers Will Be in a drop-down List eg:
6718
0820
7141
0821

I need it to Be able to, When I Select '6718' from the drop down Menu
"375 CAN 2lB18 C/F D/COKE" will Appear in the Next Cell.

View 9 Replies View Related

How To Input Text Into Cell Based On Database Using Form

Jan 23, 2013

i was wondering if it was possible to move database entries from sheet to sheet using a user form ? any examples for this ?

View 1 Replies View Related

Autofilter Column Of Data Based On Cell Input?

Jul 30, 2014

I have a table of data which I would like to filter based on a manual cell input instead of the autofilter option.

The table has tickers in column B and has information from column B to U. I would like to filter the data based on a manual ticker that I enter.

View 6 Replies View Related

Hide And Delete Sheets Based On Cell Input?

Aug 11, 2014

I have a situation where i would like to hide and delete a few sheets in my worksheet.

there is a few sheets where i want it to be constantly visible and one sheet is based on a cell reference.

the remaining irrelevant sheets i would like it to be hidden and deleted.

'always visible are sheets that are constantly visible in all files' 'visible msds is the sheet where my product data is being pulled out based on a input i enter on my first sheet' the sheets i want to hide and delete will be the remaining irrelevant "MSDS" that i would like to remove through macro.

View 3 Replies View Related

Lock/unlock Cell Based On Another Cells Input

Feb 25, 2009

I want cell g12 to be locked unless cell h7 is Grass Fire or Timber Fire (H7 is a drop down validated cell)

View 8 Replies View Related

Insert Row Based On Cell Value :: Give Input Box On Click

Oct 8, 2009

when a cell in column "K" is clicked, an input box gives the user the choice of entering a number between 1 and 12. That value then inserts row(s) based on input value ..

View 6 Replies View Related

Protect Or Unprotect Cells Based On Cell Input

Nov 21, 2006

I am working on my spreadsheet and was wondering if anyone knows if cells can be Protected or Unprotected based on the value of another cell?

Here is what I am looking for:

If cell "A16" on the "Input Sheet" equals AR then Protect Cells J16, K16, L16, M16, N16, and O16

If the value of A16 on the Input Sheet DOES NOT equal AR then leave those cells unprotected.

Has anyone ever done anything like this? On my spreadsheet it would allow the user to skip the unnecessary cells as opposed to having to Tab through them. Not a big deal but definitely would be a time saver and a lot more user friendly.

If you have any questions or concerns just let me know. I will wait to see what the Excel Guru's come up with.

View 9 Replies View Related

Hiding / Unhiding Rows Based On Cell Input

Jul 2, 2009

I am trying to work out a macro to hide and unhide rows in worksheet 6 based on a cell input (cell I6) in worksheet 1 based on the following:

>> If I6 in Worksheet 1 = 1 or 5 or 6 then Hide Rows 19 to 24 in Worksheet 6
>> If I6 in Worksheet 1 = 2 then Hide Rows 21 to 24 in Worksheet 6
>> If I6 in Worksheet 1 = 3 or 4 or 7 then Hide Rows 17 to 20 in Worksheet 6
>> If I6 in Worksheet 1 = 8 or 9 then Hide Rows 17 to 20 and Rows 23 to 24 in Worksheet 6

View 9 Replies View Related

Restrict Cell Input Based On Another Cell Value

Jul 27, 2009

I've written a spreadsheet and am wondering if there is a way to permit data entry in a cell, contingent upon another cell being populated.

In simple terms, you can't enter data in cell X, until cell "Y" has been populated with something.

View 14 Replies View Related

Referencing Cell Based On User Input That Corresponds To VLookup

Jun 26, 2014

So my issue this time is that I have a bunch of columns that correspond to a month. If the user wants to view data from that month column then they have to link to that cell specifically (the worksheet being used is different than the one in which the month columns are)

My goal was to create a single cell in which the user typed in a month abbreviation such as jan, feb, mar.. so on and so forth. From there they correspond to a vlookup table which tells you which month is in what column (because that part never changes) so jan is in column c and feb is in column d... continuing until december is in column n. So the vlookup corresponds to the table and that works fine, type jan into the cell and the vlookup returns c. So i think this will work.

My problem is that in the cell I am typing this in I want it to be a part of a whole cell reference such as c5 or d7 where the 5 or 7 is a constant (I have that part down) however the reference is to another sheet. So in sheet 2 I want to reference sheet 1 i.e.

Formula: [Code].....

<-- is the desired return.

Right now (in sheet 2) I have

Formula: [Select Code] .....

Which returns the desired d5 but as text and not referencing sheet one. I tried

Formula: [Code]....

But this makes the vlookup malfunction (i think it starts looking in sheet 1 for the month cell but it is not and can not be there.

SO how do i force a vlookup to turn into a cell reference, and how do i make that cell reference come from a different worksheet without causing the vlookup to malfunction.

Attached File : examples.xlsx‎

View 2 Replies View Related

Conditional Input In A Cell Based On Data In Two Different Cells And Other Values

Dec 4, 2009

I have lot of data in three columns like this. The first column is "Name", the second is "Comment" wherein I want the macro to write some comment, the third one is DOB. The problem is that the names in column 1 repeats many times. I want a macro to write in column B "either Old or Older or Oldest" based on the Name and DOB. Thus David with DOB 13 Sep 1982 be marked Oldest in Column B and David with DOB 25 Aug 1988 be marked Older and David with DOB 24 May 1990 be marked Old. Similarly William and Rita should be marked either old or older or oldest. As the data are enormous I do not want to refer the actual name in the programming. I want to call them using a variable in programming.

NameComment DOB
David 25 August 1988
David 13 September 1982
David 24 May 1990
William 24 March 1980
William 25 July 1987
William 13 August 1989
Rita 17 July 1990
Rita 24 April 1989
Rita 13 June 1988
The example file is attached

View 14 Replies View Related

Run Macro After Cell Data Input

Jan 24, 2012

I want to run a macro that unhides 15 lines (line 20 to 35) when data is inputed on cell 'F6' and to run another macro called "search" (i have already finished this macro) which will fill in information on the unhidden lines from above.

View 4 Replies View Related

Create Documents Based On Cell Values And Input Tabs In New Document

Sep 12, 2013

I want to create a macro that creates a new .xlsx document based on cell values. And input 4 tabs into each document with specified tab names. I have a document that pulls from external sources and fluctuates with amount of data per day. I envision something that will make a new document named for the contents in cell A1, then function as a control+down to create a new document for A2, then A3 until there is no content left (should mention these are lookup formulas, and if there is no data it pulls a value of "0")

Is there a way to put in the code, the tab names it would create in each new document, or would that have to look to a cell value for the naming? The tab names would be "GS", "MYSS", "COLL SHEET", and "WIRE".

View 1 Replies View Related

VBA Code To Find Row Number Based On Data Via Input Box And Highlight Cell?

Jun 21, 2014

I want to enter a unique ID into an input box which will tell which row that id is available and then it will again ask me which column the cell needs to be highlighted. Once i enter the data, it will then ask me what is the change in data (again via input box). i can then enter the change data and then it stops.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved