ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy/Paste based on cell content. (https://www.excelbanter.com/excel-programming/296168-copy-paste-based-cell-content.html)

Hugh Askew

Copy/Paste based on cell content.
 
Howdy. This seems like it should be simple, but I am an absolute idiot
when it comes to macros and/or code.

Here is what I have:
Use a template for quotes, Dropdown in B12 lets me pick out a product
group, in C12, another gets the size, D12 displays the product code,
various lookups in Col E,F,G,H give breakdown for parts list, which in
turn are priced in Col. I from another lookup list.
All well and good, but I include a small thumbnail in Column A, that
prints out with the quote.
Currently I copy and paste from a list of products that are on a
sheet named "Products".
Obviously, this becomes very tedious.

Is there any way to automate this, so that after I finish entering the
code, a macro would lookup the Product Code, then copy the appropriate
cell from the "Products" sheet and paste it into the appropriate cell
on my quote sheet?

Have tried recording a macro, but it only does:
Sheets("Products").Select
Selection.Copy
Sheets("Qoute").Select
ActiveSheet.Paste

Any help would be appreciated muchly!!

Nigel[_8_]

Copy/Paste based on cell content.
 
Why not put a VLOOKUP in column A that use the product number (stored in the
example below in X1) from your product table. The number at the end of the
formula determines the column of data from the product table that is
returned.

So for the product code in X1 lookup this code in the products sheet table
A1 to C500, if found return the value in column C for that row.

=VLOOKUP(X1,Products!A1:C500,3)

HTH
Cheers
Nigel

"Hugh Askew" wrote in message
m...
Howdy. This seems like it should be simple, but I am an absolute idiot
when it comes to macros and/or code.

Here is what I have:
Use a template for quotes, Dropdown in B12 lets me pick out a product
group, in C12, another gets the size, D12 displays the product code,
various lookups in Col E,F,G,H give breakdown for parts list, which in
turn are priced in Col. I from another lookup list.
All well and good, but I include a small thumbnail in Column A, that
prints out with the quote.
Currently I copy and paste from a list of products that are on a
sheet named "Products".
Obviously, this becomes very tedious.

Is there any way to automate this, so that after I finish entering the
code, a macro would lookup the Product Code, then copy the appropriate
cell from the "Products" sheet and paste it into the appropriate cell
on my quote sheet?

Have tried recording a macro, but it only does:
Sheets("Products").Select
Selection.Copy
Sheets("Qoute").Select
ActiveSheet.Paste

Any help would be appreciated muchly!!




Hugh Askew

Copy/Paste based on cell content.
 
Nigel, thanks for the reply, however, i am looking to copy and paste
the cell's "contents", in this case a small thumbnail line drawing. I
am comfortable using formulas, just don't know how to use VBA to get
XL to copy and paste the thumbnail drawings.


"Nigel" wrote in message ...
Why not put a VLOOKUP in column A that use the product number (stored in the
example below in X1) from your product table. The number at the end of the
formula determines the column of data from the product table that is
returned.

So for the product code in X1 lookup this code in the products sheet table
A1 to C500, if found return the value in column C for that row.

=VLOOKUP(X1,Products!A1:C500,3)

HTH
Cheers
Nigel

"Hugh Askew" wrote in message
m...
Howdy. This seems like it should be simple, but I am an absolute idiot
when it comes to macros and/or code.

Here is what I have:
Use a template for quotes, Dropdown in B12 lets me pick out a product
group, in C12, another gets the size, D12 displays the product code,
various lookups in Col E,F,G,H give breakdown for parts list, which in
turn are priced in Col. I from another lookup list.
All well and good, but I include a small thumbnail in Column A, that
prints out with the quote.
Currently I copy and paste from a list of products that are on a
sheet named "Products".
Obviously, this becomes very tedious.

Is there any way to automate this, so that after I finish entering the
code, a macro would lookup the Product Code, then copy the appropriate
cell from the "Products" sheet and paste it into the appropriate cell
on my quote sheet?

Have tried recording a macro, but it only does:
Sheets("Products").Select
Selection.Copy
Sheets("Quote").Select
ActiveSheet.Paste

Any help would be appreciated muchly!!



All times are GMT +1. The time now is 07:44 AM.

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