Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Jamie
You could insert a new column in front of your quotes layout. I used column A. I also had my quotation layout starting at Row 8, change to suit your case. The following Event code, allows you to clcik on a cell in column A within the range of our quotation. The code then asks whether you wish to insert Case details. If you say Yes, the code will insert 3 lines immediately below the line on which you clicked. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Count 1 Then Exit Sub ' more than 1 cell selected If Target.Column 1 Then Exit Sub ' not column A, change to suit If Target.Row < 8 Then Exit Sub ' before row 8, change to suit Select Case MsgBox("Do you want to Insert Case details?", _ vbYesNo Or vbQuestion Or vbDefaultButton1, Application.Name) Case vbNo Exit Sub Case vbYes End Select With Target ..Offset(1).Resize(3).EntireRow.Insert Shift:=xlDown End With End Sub Copy the Code. Right click on the worksheet tab View code Paste the code into the white pane that appears. Alt + F11 to return to Excel -- Regards Roger Govier "Jamie" wrote in message ... Dear Don et al., I have a similar issue to this, but not the same. I work for a packaging company, and I want to create a sheet for quoting clients. If they require one wooden crate they click yes on a drop down validation screen, I then want a series of rows (3 to be exact) to drop into the screen which are the dimensions of the required crate as well as the type of crate. I then want the sheet to ask if I want another crate, if yes is answered, a further 3 lines drop in. If the answer is no to additional crates, nothing more is dropped in. The crates are just part of the quotation process not the last line, hence my question is similar, but not the same. Is this possible? Many thanks Jamie "Don Guillett" wrote: Footer is not the proper word for the last row However, IF? you are saying that you want to enter info in the row just before the last row and have a row inserted between that data and the last row then right click the sheet tabview codecopy/paste this. Now,when you add data in the next to the last row of column A, the row will auto insert below. Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False If Target.Column = 1 And Target.Row = _ Cells(Rows.Count, 1).End(xlUp).Row - 1 Then Rows(Target.Row + 1).insert End If Application.EnableEvents = True End Sub Sub fixifbroke() Application.EnableEvents = True End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Southern at Heart" wrote in message ... I have an expense report I made. The Heading across the top of the columns a Date Description Mileage Hours Supplies Total then at the bottom it tallys up these, and has a few other things like hourly wages... Sometimes a job might have 30 lines, and other time 100 lines. Is there a way to have the footer part of my sheadsheet automatically adjust (add lines as I use them) so that I don't have to have my footer way down, off the screen, when I'm doing a smaller job. But if it does automatically add lines in, then those lines will need to be tallied in the totals in the footer section. I would be great if there were a feature that would do this: It would just give be 1 blank row before the footer. And then when I put data in that row for that day, it would add another blank row, so it would automatlcally grow in this fashion. thanks, southern at heart |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Inserting rows automatically. | Excel Worksheet Functions | |||
inserting rows automatically? | Excel Discussion (Misc queries) | |||
Automatically copying fomulae when Inserting rows | Excel Discussion (Misc queries) | |||
Automatically inserting rows | Excel Worksheet Functions | |||
Automatically inserting rows | Excel Worksheet Functions |