View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Aneka Aneka is offline
external usenet poster
 
Posts: 5
Default Copying concatenate not returning correct cell information

I am using the concatenate to write multiple SQL insert statements (sometimes
hundreds or thousands).

=CONCATENATE("insert into #gs_entity_ad(entity_id, ad_id) values(",B1,",
3073761)")

The B column of my document contains all of the unique IDs. Normally, when
I do the copying (usually I double-click on the square in the bottom
right-hand corner of cell A1 and it copies to the end of the document) I
don't have a problem.

In the spreadsheet, I'm seeing this.

In A2
=CONCATENATE("insert into #gs_entity_ad(entity_id, ad_id) values(",B2,",
3073761)")

In A3
=CONCATENATE("insert into #gs_entity_ad(entity_id, ad_id) values(",B3,",
3073761)")

However, when I copy/paste the results into the text doc, where I would
normally see the expected B2 and B3 values, I'm seeing the B1 value.

Any ideas in troubleshooting this are extremely appreciated!

"Sheeloo" wrote:

When you copy from A2 and paste it to a text document it should paste what
you see in A2...

What is the formula you are using? What are the values in B1 and B2?

"Aneka" wrote:

A1 B1-B200
concat unique
formula numbers

I am using a concatenate formula in column A that uses column B as a
variable. When I copy the formula down the spreadsheet, the formula reflects
the cell change (from B1 to B2, for example). However, when I copy/paste the
results of the formula from A2 into a text doc (which should contain the
number in B2) it is retaining the number from B1.

How do I rectify this?