Tags: absolute, based, cell, code, content, copy, excel, haveuse, howdy, idiotwhen, macros, microsoft, msdn, paste, software, template

Copy/Paste based on cell content.

On Microsoft » Microsoft Excel

3,948 words with 2 Comments; publish: Mon, 26 May 2008 13:49:00 GMT; (306155.76, « »)

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!!

All Comments

Leave a comment...

  • 2 Comments
    • 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" <hughaskew2.excel.todaysummary.com.yahoo.com> wrote in message

      news:b7f6b528.0404240650.2998157.excel.todaysummary.com.posting.google.co 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!!

      #1; Mon, 26 May 2008 13:50:00 GMT
    • 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" <nigel-9sw.excel.todaysummary.com.suxnospampanet.com> wrote in message news:<#hPazAhKEHA.1892.excel.todaysummary.com.TK2MSFTNGP09.phx.gbl>...[vbcol=seagreen]

      > 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" <hughaskew2.excel.todaysummary.com.yahoo.com> wrote in message

      > news:b7f6b528.0404240650.2998157.excel.todaysummary.com.posting.google.co m...

      #2; Mon, 26 May 2008 13:51:00 GMT