How to transpose only the columns with names containing "Invoices"

Hi,

I need to transpose data from columns with names containing “Invoices”. I’ve discovered that the Copy and Paste Range feature can transpose data, but I’m unsure about the specific inputs for the source and destination.

Could someone please provide guidance on how to correctly specify these parameters?

Thank you!

@lqxchan

Can you please share an input and expected output that would help in understanding better

Cheers

Hi

Here’s an example

image

@lqxchan

So ypu mean only first row to be considered while transposing?

If yes then just retain only one row and then use transpose

Dt = Dt.AsEnumerable.Take(1).CopyToDatatable

Cheers

However, my first row contains additional columns such as ‘Date,’ ‘Vendor ID,’ and others.

How can I handle this using the Copy and Paste Range feature?"

@lqxchan

you cannot use copy paste directly…you need to copy the data to another sheet remove all extra columsn and rows and then use transpose

For removing you can use datatable and then write to excel

cheers