Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 65
Default Copy columns, but not hidden ones

On my spreadsheet I have calculations and formatting of fields etc.--many thanks Claus for the assistance.

what I have is:

A B C D E F G H
010203NN 27.50 020203YY 56.75 525251NY 175.2 101020YN 1.75

The values in columns B, D, F & H are obtained from a VLOOKUP on another table.

What I want to do is...

Total the values in the numeric columns and store them in another cell..easy, done that.

However, what I also want to do is copy the data that is in the other cells, and paste the values into another spreadsheet. The problem I am having is that the copy / paste, is pasting in the values that are stored in B, D, F & H as well. I am then having to move each column left by one to get rid of the values.

I have thought of storing the value elsewhere, but can't think of somewhere to put it, without adding to the size of the file...it is already fairly large. Another thought I had was to add the values in the total cell, by simply inserting the VLOOKUP's there...however, there are 50 of them!

Suggestions, please.

Many thanks

Duncs
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Copy columns, but not hidden ones

Hi Duncan,

Am Fri, 14 Dec 2012 02:19:18 -0800 (PST) schrieb Duncs:

A B C D E F G H
010203NN 27.50 020203YY 56.75 525251NY 175.2 101020YN 1.75


However, what I also want to do is copy the data that is in the other cells, and paste the values into another spreadsheet. The problem I am having is that the copy / paste, is pasting in the values that are stored in B, D, F & H as well. I am then having to move each column left by one to get rid of the values.


try with a macro (modify to suit):

Sub copy()
Dim i As Integer
Dim j As Integer

For i = 1 To 7 Step 2
With Sheets("Sheet1")
j = j + 1
.Columns(i).copy _
Destination:=Sheets("Sheet2").Cells(1, j)
End With
Next
End Sub


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 65
Default Copy columns, but not hidden ones

Cheers Claus, once again.

I've put it into the spreadsheet and modified accordingly. I perhaps didn't explain fully in my original post and for that, I am sorry. I should have added that I won't be copying the entire column. Instead, I will only be copying a section of the text...e.g. the range A1...H1. Then, the next time with may be A10...H19.

The size of the area I am copying will vary each time I want to copy. I've looked at selecting the required range, identifying this range, and copying the data from within this area. I then need to copy the values to a different location each time...e.g. the first paste may be at A1. The next may be at A17, then A23 etc.

I think the selected range method may be the best but as I say, I can't get the method for it.

Can you assist, once again?

Duncs
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Copy columns, but not hidden ones

hi Duncan,

Am Fri, 14 Dec 2012 04:14:12 -0800 (PST) schrieb Duncs:

I've put it into the spreadsheet and modified accordingly. I perhaps didn't explain fully in my original post and for that, I am sorry. I should have added that I won't be copying the entire column. Instead, I will only be copying a section of the text...e.g. the range A1...H1. Then, the next time with may be A10...H19.

The size of the area I am copying will vary each time I want to copy. I've looked at selecting the required range, identifying this range, and copying the data from within this area. I then need to copy the values to a different location each time...e.g. the first paste may be at A1. The next may be at A17, then A23 etc.

I think the selected range method may be the best but as I say, I can't get the method for it.


if the copied ranges and the paste locations are so different, you can't
do it automatic. If the paste location is the same range as the copied
range but on another sheet, you could do it with a macro.


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy HIDDEN columns to a new workbook Rachel Excel Programming 3 January 17th 10 05:03 PM
Copy and Paste with hidden columns remaining hidden Pendelfin Excel Discussion (Misc queries) 2 February 26th 09 11:35 AM
Not include hidden columns in copy paste jbc Excel Discussion (Misc queries) 2 July 19th 07 01:46 AM
How do I copy a worksheet so that hidden columns remain secret? Vanessa Long Excel Discussion (Misc queries) 1 July 9th 07 01:42 PM
COPY - *want* to include hidden columns Eric[_27_] Excel Programming 5 July 26th 05 01:58 PM


All times are GMT +1. The time now is 08:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"