How To Automatically Enter A Value Next In Sequence In A Cells
Dec 18, 2012
I was wondering how I could automatically enter a value next in a sequence in a cell when an adjacent cell has data in it and continue doing so indefinitely (or until the 65536th row). I could do this with autofil, but The sequence starts in the middle of the worksheet (there is a title and document data in the top few rows). The layout is as follows:
Cell A17 has "Part 1" in it (and always will before the form gets filled out), and all cells in colum A beneath that will be blank. Column B is where the user enters a dimension. So, at the start, entering a value into cell B17 won't do anything. However, if they enter a value into cell B18, I would like cell A18 to automatically be filled with the next part number in the sequence (in this case, "Part 2" in cell A18). The user will never skip rows when they enter data so the sequence will always be +1 to the previous cell in the column.
I'm doing this so they can just print out the completed sheet and not have to edit out the empty "Part *" cells that have no corrosponding dimensions.
Is there a simple way to tailor autofill to do this or would I need a macro?
View 3 Replies
ADVERTISEMENT
Nov 22, 2006
I'm trying to write a macro that automatically italicize the a range of cells when you select a cell, and de-italicize it if you click it again. In this example, when select B12, the macro will automatically select B12:H12 and italize them. And if you select B12 again, it will automatically select B12:H12 and de-italize it.
This is what I have so far:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MyAddress = ActiveCell.Row
If MyAddress > 11 And MyAddress < 159 Then
If Not Intersect(Columns(2), Target) Is Nothing Then
Intersect(Columns(2), Target).Resize(, 7).Select
End If
Select Case Target.Font.Italic
Case "True"
Target.Font.Italic = False
Case "False"
Target.Font.Italic = True
End Select
End If
End Sub
The code above does not work correctly.
View 4 Replies
View Related
Jan 8, 2010
I am working on blood pressures. I want cell C1 to place either, "Prehypertension","Stage I Hypertension" or, "Stage II Hypertension" depending on the values of cells A1 or B1 ....
View 7 Replies
View Related
Sep 23, 2008
I am trying to use visual basic editor in excel. I have all ready set up my user form where information can be entered, but I ave having trouble getting the information that is entered in the user form into the correct cells in excel.
I am wanting my information to enter the tables and then automatically move into the next available cells below.
Private Sub cmdadd_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("details of cars in stock")
iRow = ws.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row
If Trim(Me.txtreg.Value) = "" Then
Me.txtreg.SetFocus
MsgBox "please enter a registraion number"
Exit Sub
End If
ws.Cells(iRow, 1).Value = Me.txtreg.Value
Me.txtreg.Value = ""
View 9 Replies
View Related
Nov 1, 2013
I have a excel workbook with One Master Sheet.
The data entered in the master sheet is automatically updated in the sub worksheets through direct links created . Each sub worksheet is a branch of organization. almost 100 branches are there.
The data is entered for all the branches in the Master Sheet at different periods continuously which is to be kept as such.
For example In first day 10th, 15th branch data may be entered in master sheet first and second row, which is getting automatically updated in the respective branch worksheets. But the problem is when the data is entered for any branch( for example 6th branch) in 5th row of Master sheet, in the respective 6th branch sheet also, it is updated only in 5th row only, leaving the first four rows blank. But i want the updation in the branch sheet continuously without any blank rows.
For updation i have used the simple direct link between the cells of Master worksheet and Branch sheets.
How to get the updation in branch worksheets while entering the data in Master sheet without any blank rows.
View 6 Replies
View Related
Mar 23, 2012
I am trying to keep my checkbook in excel and want to make a spreadsheet that inserts a row every time I hit enter. That way my most reason transaction and balance is always at the top rather than the bottom of the spreadsheet... The inserted row should have the same formulas as the row below.
View 7 Replies
View Related
Apr 25, 2007
How do I get a cell to automatically add the numbers as I enter them,for example. I want to keep track of my gas bills for income tax. So if I go in each day to add that days gas amount I want that cell to auto add each entry for me, rather that constantly add my bills and then re-enter every time I enter new amounts.
View 9 Replies
View Related
Nov 10, 2006
I would like to place a value of like say 100 dollars if the cell next to it is populated with any text for example: customer then 100.00 so if I type anything the cell, the next cell populates a specified value
View 5 Replies
View Related
Apr 3, 2007
I have recently written some programming in a spreadsheet (1) which, on opening, opens up another spreadheet(2), ammends this spreadsheet(2), and then closes it before the user can start using the original one(1). This is done to monitor the usage. The information added into the atomatically opened spreadsheet(2) includes date and time of opening and the users id as well as adding 1 to counter cells. Both .xls files are located on the same server and I dont want people to catch on to the monitoring and if they do I dont want them to then go into this file(2) and remove their information.
If I password protect this file(2) it then promts to enter a password when it runs at the startup of the initial spreadsheet(1) which is no good as it would defeat the purpose if the user knew the password. Is it possible to add a few lines into the code (see below) after it initiates the opening of the usage file?
Private Sub workbook_open()
Application. ScreenUpdating = False
Workbooks.Open Filename:= _
"S:Newman CommonCATEGORY MANAGEMENT - RangesEPoS Usage.xls"
Dim Counter As Integer
Counter = Cells(2, 7)
Counter = Counter + 1
Cells(2, 7) = Counter
Cells(Rows.Count, "BV").End(xlUp).Offset(1, 0) = Now
Cells(Rows.Count, "BW").End(xlUp).Offset(1, 0) = Application.UserName
ActiveWorkbook.Save
ActiveWindow.Close
Application.ScreenUpdating = True
End Sub
View 6 Replies
View Related
Nov 11, 2013
I have data on 400 rows. Each row has a maximum of 10 cells with data, but many have empty cells with no data. I would like to sort each row to show values of cells in sequence and eliminate empty cells. I can use the sort row function but its a long process for 400 individual rows. Is there an easier way?
View 1 Replies
View Related
Oct 8, 2013
I have a command button that opens 5 windows when it is selected. Each window asks us to enter the username, password and logon to in order to sign on...thus, we have to do this a total of 5x manually.
If possible, I'd like for the aforementioned fields to be entered using VBA code, so when I click the command button, all 5 windows open with the login infomration already entered.
For examples, sake, lets say the usernmae is ABC1234, the password is Password and the Logon To field is Alliance. If this is possible, how would I code this?
View 2 Replies
View Related
Apr 21, 2009
Is there a way that Excel can automatically enter to next row once the typing has reach the end.
Example: I have 5 columns (A to E) and I am typing at column A. While typing, the text will go along to cell B, C, D and E. The problem is, if I don't manually go to next row and continue typing, the text will go to column F, G and so on. Is there a way where excel can automatically jump to next row if the text has reach column E?
Another problem is, say I have 3 rows full of text (column A to E). If I edit one of the row to exter some new texts, the whole sentence will go along to column F, G and so on. What I can do now is, re-edit all the rows to adjust them back.
View 9 Replies
View Related
Nov 29, 2013
How to set a column up to show it as the time of day but unless I enter PM after I put the time in the column it always comes up as AM.
Is there some way to just enter 9:09 in column d and or f and have it show up as pm? When I enter 8:10 in column b it automatically adds the AM to it but if I do the same in the column for the night and I do not type in pm it will automatically enter it as am.
I have attached the workbook and did delete the macro - which was just to clear all of my entries but when I click to open it again I am still getting the message about the macro.
In the workbook when I enter the time in column B I can just type in 7:14 and it will automatically add the AM to it. However, when I get to column D or F if I just type in 9:09 or whatever time it is in the evening it will automatically add AM to it unless I type 9:09 pm.
Is there some way to set it up so that I can just enter the time and it will automatically enter pm for everything in that column?
2013 sugar logs.xls‎
View 9 Replies
View Related
Jan 6, 2014
In column B I will be entering a number and I would like it to automatically enter gallons in column c when i do so. So if i enter 356 in b2 i want it to say gallons in c2.
View 1 Replies
View Related
Jan 14, 2009
See attached sample sheet for more detail. I used code for show date and user id in cell “H” and “I”, but my problem is when ever I write some thing between cells “A” to “G” and enter the pointer automatically jumped to cell “H”, I want when I enter the pointer should be stay next cell.
View 2 Replies
View Related
Jun 1, 2006
I am making a template for my company to automatically calculate the amount of sheet metal needed for a specific job. The spreadsheet could get very long depending on how much duct is needed. Is there any way I can automatically insert rows to the end of the sheet by pressing enter after filling the last row with data, which would then move the totals down. Also, the formatting of the rows I wish to add need to be copies of the ones above.
View 3 Replies
View Related
Feb 25, 2013
I have some VBA code which hides columns based on a cell value. The cell value changes according to which option button is selected. The code works but not when the button is selected and the cell value changes. It is necessary to click elsewhere in the sheet or press Enter to get the columns to hide. I want it to do it automatically as a user wouldn't know to click elsewhere.
The working code is:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("N5").Value = 2 Then
Columns("O:R").EntireColumn.Hidden = True
Else
Columns("O:R").EntireColumn.Hidden = False
End If
End Sub
N5 is the linked cell for the option button.
View 4 Replies
View Related
May 7, 2014
I am needing a custom format for the following. I need a cell entry to be 1 letter, three numbers, a dash, 5 numbers, a dash, two numbers, a dash, and then two number. Example: A109-54785-13-00. The first letter will almost always be an "A."
To further complicate the matter, the entry is copied from an email and pasted without the dashes. In the above example, the number in the email would read, "A109547851300." I copy it from the email and paste it in the proper cell in the worksheet. I would like the custom format to automatically enter the dashes at the appropriate spot.
If it was all numbers, this would be easy. I created a custom format for the numbers, but when the A is included, Excel no longer treats it as a number and the custom format did not work.
Is this possible in Excel (without VBA).
I could use the custom number format I created and then later go back and add the "A" at the beginning, but that is as much work as manually adding the dashes.
View 2 Replies
View Related
Mar 12, 2014
I have a column of values, and I want a column next to it that shows the value in every second cell in the first column, but right underneath. See below for an example of what I am trying to achieve. The actual column is 17000 cells so I cant do it manually.
12
24
36
48
510
612
7
8
9
10
View 5 Replies
View Related
Mar 14, 2013
What I am attempting to do is have my spreadsheet automatically detect and highlight personnel working seven days in a row. There are 63 total columns, the first one being for the person's name. The next 31 columns are a full month's dates in which their day shifts are recorded, while the final 31 are the full month's dates for night shifts worked. Days worked are listed as a "1" in the cell beneath the respective shift's date, while days off go down as "3". Currently I am using conditional formatting with the following formula, which highlights cells in red:
=ISNUMBER(FIND("1111111",(H7&I7&J7&K7&L7&M7&N7&O7&P7&Q7&R7&S7&T7&U7&V7&W7&X7&Y7&Z7&AA7&AB7&AC7&AD7&AE7&AF7&AG7&AH7&AI7&AJ7&AK7&AL7)))
I created the conditional formatting formula to apply to the row for the first person listed, and then copied and pasted the formatting only for the rest of the personnel rows. The issue I'm having is that while it will highlight the seventh work days, it will often highlights all cells prior to the grouping which has seven straight days of work. It also tends to highlight single or multiple cells in red which do not fit the pattern, and whose rows may not even have seven straight days of work.
View 1 Replies
View Related
Feb 21, 2014
I have a sheet with hundreds of rows of customer information; including a 7 digit customer number. I need a macro to delete all the rows where the customer number sequence start with 1 thru 8 (that would be the first digit of the customer numbers).
View 9 Replies
View Related
Apr 26, 2014
i am trying to remove some duplicates in a sequence and add new cells for missing ones
View 9 Replies
View Related
May 8, 2009
how to make a certain type of date automate. It's kind of hard to explain, but basically, I'd like to make it so that when I enter a date in one column, another column will automatically populate with the 1st of the next month. For example:
If I enter 4/26/2009 in the 1st column, column 2 will read: 5/1/2009
If I enter 1/19/2008 .................................................. 2/1/2008
Also, it's very important that if the FIRST date is already the first of the month, then the second column will read the same. For instance: If I enter 3/1/2009 in the first colum, the second column will ALSO read 3/1/2009.
View 3 Replies
View Related
May 29, 2013
I want to enter the word 'Closed' in cell B1 when the due date in cell A1 is exceeded by 272 days. I have tried using conditional formatting and excel accepts the formula but nothing seems to happen. Here is what I have tried;
B1=IF(A1<=NOW()-272,"Closed")
View 4 Replies
View Related
Jul 10, 2006
I have 6 Headings in excel named...
"A" in cell A1, B in B1, "C" in C1, "D" in D1, "E" in E1 and "F" in F1.
There are two projects.
Project 1 has phase A, D & F and Project 2 has phase A, B, C, D & E.
My Specification follows...
1). Take Prject 1 - Which starts from A...in cell A2 I will keyin "A". When the phase comes to an end I will key in the end date of the phase. As soon as I key in the end date in cell A2 Letter D should automatically appear in the cell D2 and when Phase D comes to an end I will key in the end date in Cell D2 which should automatically keyin F in the cell F2. and is the same case for Project 2.
View 3 Replies
View Related
Sep 8, 2007
Automatically copy formula to next cell when i enter something in perticular cell ....
View 11 Replies
View Related
Jul 29, 2013
I am trying to enter a value in a cell which is dependent on a corresponding value in a table. I have a table A which has a cab type and a corresponding cab number.
What I want to achieve is that when I enter the cab number in another table say in cell (D3), the cab type is automatically entered in cell (C3).
Table A
Cab Type
Cab No
Indigo
100
Indigo
758
Innova
1544
Indica
1675
View 1 Replies
View Related
Jul 28, 2013
I am trying to enter a value in a cell which is dependent on a corresponding value in a table. I have a table A which has a cab type and a corresponding cab number. What I want to achieve is that when I enter the cab number in another table say in cell (D3), the cab type is automatically entered in cell (C3).
Table A
Cab Type
Cab No
[Code].....
View 7 Replies
View Related
Oct 28, 2009
I have an excel sheet wherein I want to enter the following formula into cell G11 when aparticular Macro is run by the user. I am using the following command but it is showing some error.
View 4 Replies
View Related
Dec 31, 2009
I have some imported data that Excel does not recognize as date or time so I have to edit each cell pressing F2 and the enter to "convert" the value.
I have about 120.000 records and the macro takes long time to do the job.
View 8 Replies
View Related