ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Line copy - Not just a simple copy paste (https://www.excelbanter.com/excel-worksheet-functions/241747-line-copy-not-just-simple-copy-paste.html)

Ninerref

Line copy - Not just a simple copy paste
 
I am currently creating an excel based estimating software and have
hit a brick wall.

Two-Fold Problem:
My current database format utilizes drop down items under each
estimate sub-item.

First I want to be able to, once an item is selected, have another
line automatically self-insert in the next row with the same drop down
list from the previous line.

Secondly, as an item is selected I also want to have the selected item
copied over to anoth existing worksheet. I am not sure if this needs
to be a pivot table or what because there needs to be some logic to
where it shows up on the second worksheet.

Any and all help would be greatly appreciated. Or if this is just not
possible then a slap on the hand for posting this may be needed.

Normek

Line copy - Not just a simple copy paste
 
Hi Ninerref,
Of couse this is possible:
In the VBA editor double click on the sheet name you are using (not the
ordinary modules) to open the private module for that sheet,
Click the left hand top dropdown box and select worksheet.
The shell for a macro called Worksheet_Selection Change(ByVal Target As
Range) is automatically generated by default.

Insert inside code which includes :
If Target.address is "$A$1" Then
(or whatever your cell is) then copy and paste to your two locations
Use for .. next to loop through your range of cells

hope this helps.

"Ninerref" wrote:

I am currently creating an excel based estimating software and have
hit a brick wall.

Two-Fold Problem:
My current database format utilizes drop down items under each
estimate sub-item.

First I want to be able to, once an item is selected, have another
line automatically self-insert in the next row with the same drop down
list from the previous line.

Secondly, as an item is selected I also want to have the selected item
copied over to anoth existing worksheet. I am not sure if this needs
to be a pivot table or what because there needs to be some logic to
where it shows up on the second worksheet.

Any and all help would be greatly appreciated. Or if this is just not
possible then a slap on the hand for posting this may be needed.


Ninerref

Line copy - Not just a simple copy paste
 
I guess I did not clearly state the original problem with the copy and
paste question. What I am looking to do is, once an item is selected
in a drop down menu in said workbook, I want the row with all of its
background data to be copied and pasted into a new row with the
original dropdown menu text shown as the main text. Basically, it
would be like copying and pasting the original row of data before any
other operation occurs.

On Sep 4, 2:41*pm, Ninerref wrote:
I am currently creating an excel based estimating software and have
hit a brick wall.

Two-Fold Problem:
My current database format utilizes drop down items under each
estimate sub-item.

First I want to be able to, once an item is selected, have another
line automatically self-insert in the next row with the same drop down
list from the previous line.

Secondly, as an item is selected I also want to have the selected item
copied over to anoth existing worksheet. I am not sure if this needs
to be a pivot table or what because there needs to be some logic to
where it shows up on the second worksheet.

Any and all help would be greatly appreciated. Or if this is just not
possible then a slap on the hand for posting this may be needed.



Normek

Line copy - Not just a simple copy paste
 
If I understand you correctly, all you need to do is record a macro of
yourself doing the copying and pasting and then run that macro using the
technique outlined in my previous post. To select the next line use
activecell.offset(row,column) eg activecell.offset(1,0).select for the next
cell below.

"Ninerref" wrote:

I guess I did not clearly state the original problem with the copy and
paste question. What I am looking to do is, once an item is selected
in a drop down menu in said workbook, I want the row with all of its
background data to be copied and pasted into a new row with the
original dropdown menu text shown as the main text. Basically, it
would be like copying and pasting the original row of data before any
other operation occurs.

On Sep 4, 2:41 pm, Ninerref wrote:
I am currently creating an excel based estimating software and have
hit a brick wall.

Two-Fold Problem:
My current database format utilizes drop down items under each
estimate sub-item.

First I want to be able to, once an item is selected, have another
line automatically self-insert in the next row with the same drop down
list from the previous line.

Secondly, as an item is selected I also want to have the selected item
copied over to anoth existing worksheet. I am not sure if this needs
to be a pivot table or what because there needs to be some logic to
where it shows up on the second worksheet.

Any and all help would be greatly appreciated. Or if this is just not
possible then a slap on the hand for posting this may be needed.





All times are GMT +1. The time now is 03:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com