Copy column header to next column, delete & delete every nth colum

Well	SNPid	Call	SamID	Well	SNPid	Call	SamID	Well	SNPid	Call	SamID
A01	rs10090154	C	1	A01	rs1016343	C	1	A01	rs10486567	AG	1
A02	rs10090154	C	2	A02	rs1016343	TC	2	A02	rs10486567	AG	2
A03	rs10090154	C	3	A03	rs1016343	TC	3	A03	rs10486567	G	3


Hi,
My workflow was dramatically streamlined thanks to a previous question 
posted and the generous reply and help of members here. I have another step 
in my data-cleanup that requires reformatting my excel table and I would be 
very appreciative if I can get some help. I myself do not have the Visual 
Basic abilities to do this.

Here is the table structure and data
Well	SNPid	Call	SamID	Well	SNPid	Call	SamID	Well	SNPid	Call	SamID
A01	rs10090154	C	1	A01	rs1016343	C	1	A01	rs10486567	AG	1
A02	rs10090154	C	2	A02	rs1016343	TC	2	A02	rs10486567	AG	2
A03	rs10090154	C	3	A03	rs1016343	TC	3	A03	rs10486567	G	3

There are 4 columns that keep repeating itself for many many times.
The columns are in the order :
Col A:Well
Col B:SNPid
Col C:Call
Col D:SamID and so on....
I would like to be able to do the following:
(1) I want that for every Col with the header SNPid [example col B and ColB 
+ 4 (every 4th column) ...and so on) to be copied to Col C and Col C+4 (every 
4th column) and so on...]
(2) Then I want Col B and Col B +4 and (every 4th column from there) and so 
on to be deleted.
(3) I also want every column with the Well and SamID to be deleted. However 
I want the first occurence of these to be not deleted. Meaning.. Well (Col E, 
Col I, Col M and so on.. as well as SamID Col H, Col L, Col P and so on to 
the end to be deleted.

Kindly help,
Thanks
~GH
The final table would want to look like this
Well Samid	rs10090154	rs1016343	rs10486567
A01	1	C	C	AG
A02	2	C	TC	AG
A03	3	C	TC	G
A04	4	C	C	AG

0
6/2/2009 2:47:01 PM
excel.newusers 15348 articles. 2 followers. Follow

1 Replies
452 Views

Similar Articles

[PageSpeed] 16

I realized that if I can get the Col B2 andevery 4th column, row2 to be 
copied to C2 and every 4th column row2 from C, then I can do a left to right 
sort and delete everything. So if I can get the first part to be done with a 
macro.. that will be great!
Thanks
~GH
0
6/2/2009 2:57:02 PM
Reply:

Similar Artilces:

show columns on other worksheet without using formulas
Hi, I have 1 worksheet containing lot's records. Just like in access, each line is 1 record, and each column contains data. ex: WORKSHEET 1: name title address city 1 dfjw kjhk kjhkj kjhk 2 lmkj lkjlk lkjkuf guyg 3 drdtg xcx yjutuy hgyy Now I want to have a selection of columns on worksheet 2: ex, only name and title: WORKSHEET 2: name title 1 dfjw kjhk 2 lmkj lkjlk 3 drdtg xcx I will only add/modify rows in worksheet 1. And I want that this is filled automaticaly in worksheet...

Unread deleted messages
Hi, [Outlook 2003 SP1] When I delete messages without reading them (obvious spam, for instance) they show up in my "Unread Mail" folder. Is it possible to change this behaviour? Thanks, Jan Roelof jr_de_pijper@hotmail.com <jr_de_pijper@hotmail.com> wrote: > When I delete messages without reading them (obvious spam, for > instance) they show up in my "Unread Mail" folder. Is it possible to > change this behaviour? The "Unread Mail" folder is not actually a true folder. It's a search folder which just displays all unread messages no matt...

Message-ID not getting sent in e-mail headers
Hello, I am told that the reason a specific company cannot receive our e-mails is because they do not contain a Message ID in the message header. In fact, they do not. I have ruled out problems with the mail server and suspect that it is a problem with Outlook 2003. Messages sent from a machine running Outlook 2000 contain a message ID. Messages sent from a machine running Outlook 2003 from the same account do not contain a message ID. Any advice on this would be appreciated. Regards, Robin ...

Deleting rows containing common data
I have an Excel 2000 spreadsheet with 30,000 rows. The rows look like this: 007-007 68-4611 68-4682 total 007-007 total 007-007 28-4831 68-2454 68-4682 total 007-007 28-4831 68-2454 68-4682 total 007-007 28-4831 68-2454 68-4682 total 007-007 68-4682 total 007-007 68-4682 total How do I delete the rows containing "total" One way: 1. Select the range and apply an AutoFilter (Data > Filter > AutoFilter) 2. On the drop-down list, select "Total". 3. Select the range again if needed. 5. Press F5 > Special and click "Visible Cells Only." 6. Remove...

deleted email appear again
I have been using "Delete it from Server" option in Windows Mail Rules successfully for a number of years now until recently. The I noticed i began receiving mails that I have defined to be deleted from server. To further this, I used another email address defining ...

Excel 2007
When you set reverse categories for the horizontal axis, I noticed that the legend (which I normally placed at the bottom of the chart), did not correspondingly reverse. Is this WAD (working as designed) ? If not, how can i overcome this as the reader would have to mentally "remap" the legend to the bar chart. Thanks very much. Hi, Reversing the Axis categories will not effect the legend order. To do that you need to change the Series Order. In 2007 this is none via the Select Data Source dialog. Chart Tools > Design > Data > Select Data. Use the Up/Down arrows in the...

how do i split a column
i have a worksheet with three columns but want to split column C in to two from row 37 down while keeping only three columns from rows 1-36. How can i do this? You can't. You could merge C1 & D1, C2 & d2 etc. but it seems a bit of overkill. What is the reason for this, there may be another solution? -- HTH RP "craig.d" <craig.d@discussions.microsoft.com> wrote in message news:973F49DB-EF87-4F64-AA13-7AEB3563757A@microsoft.com... > i have a worksheet with three columns but want to split column C in to two > from row 37 down while keeping only three col...

Copying from one workbook to another, without taking the name of the 1st workbook with it.
I am trying to copy from one workbook to another and when I paste the copied sheet into the new workbook, the cells refer to the name of the first workbook and I want to take that out before I paste into the new workbook. Anyone know how to get around this? Hi! If you are copying a whole sheet from one workbook to another, use th copy sheet dialogue box. (Edit>Move or copy sheet..) Remember to check Create a copy and select the workbook to copy to fro the upper dropdown box. Al -- Message posted from http://www.ExcelForum.com Hi Jenny You can do this Select all cells Use replace ...

cannot delete business unit?
Hi, I am using microsoft CRM 1.2 with demo license of Adventure works Cycle. Is there any way to delete a "Business Unit". I go to Settings -> Business Unit Settings -> Security Roles -> Business Management. The delete option for "Business Unit" and "User" is disabled there. I searched in groups and found a few discussion about deleting users which say that it is not allowed to delete mscrm users. However I did not find any reference about deletion of "Business Unit". The user guide that comes with the installation shows steps to delete a "...

Display only duplicate values and delete UNIQUE Items
All I have a very large list of data and on a monthly basis i need to display only the duplicate items in a spreadsheet. I would like to do this in VBA and then run it as a macro on the spreadsheet. Alot of the sites that i have seen only show how to removed the duplicates. Excel 2007 has a function which removed all duplicates but so far i have found nothing that only displays the duplciates.... any ideas anyone? Assuming that the field you use to determine uniqueness is column A, you can put this formula in a helper column: =3DIF(COUNTIF(A:A,A2)>1,"Duplicate","Unique&...

Previous and Next row
Hi I have the following scenario (much simplified): Worksheet with 2 columns haveing labels at the top - Column1, Column2. Each cell in Column2 needs to look at the value in Column1, say, one row down (or up). I use column labels in my formulas. Is there a compact way to reference a cell in a previous row using the label of that column (a macro function will do)? Thanks I'm sure your problem makes sense to you, but I am at a loss as to how a column label can be used to distinguish between rows. Maybe, if you share an example... -- Regards, Tushar Mehta www.tushar-mehta.com ...

copy a file to all users via a script instead of manually
I have a d:\users folder on my server. inside users, each user has a folder named with their name. inside each of those folders is a desktop folder. I have a file on the C drive that I need to copy to each of those desktop folders, thereby giving each user this shortcut. Does anyone have a script that could do that, instead of me copying this file manually a few hundred times? many thanks if you do! "Rich" <richjone@noemail.noemail> wrote in message news:5E68A580-FA4D-4B73-A548-0ED9D74AF34C@microsoft.com... > I have a d:\users folder on my server. inside...

Chart
Hello, I created a line column chart on 2 axis. I have four data sets. The first 3 should go on the primary Y axis as columns and the 4th should go on the secondary Y axis as a line. However, Excel wants to automatically put both the 3rd and 4th data sets on the secondary axis as lines. I cannot find any command to change the 3rd data set to go onto the primary axis as a column. Any suggestions would be most appreciated! -Patty On Tue, 11 Nov 2003 13:27:33 -0800, Patty = <anonymous@discussions.microsoft.com> wrote: > Hello, > > I created a line column chart on 2 ...

Deleting system locked fields
Does anyone know how I can get rid of the "Is revenue system calculated?" field on the Opportunities form? We always have user-provided values, and therefore have no need for this field, but I can't delete it. Anyone know how I can get around this? You can not delete those fields. But you can change the default value to "user provided". WIth some javascipt you should be able to hide it for the users. HTH, Frederic - Travi@ta www.microsoft-dynamics-crm.eu WiLLerZ schreef: > Does anyone know how I can get rid of the "Is revenue system > calculated?"...

Formula not copying over as before
I track sales for 97 people using seperate worksheets for each one and one total page. Everytime I would add a worksheet, I would go to the total page, copy and paste the forumula to the next cell and everything worked great. The total was pulled from lets say the 95th worksheet and put on cover sheet of the corresponding person. I've tried manually typing in the formula and it still doesn't work. Any ideas? "doesn't work" means what? No results? Results don't change? Have you looked at your Calculation Options? Are they set to "Auto"? Formula onl...

PST deleted
During the installation of the updates post Windows 2000 Service Pack 4, Outlook XP by the user: a contact from the address book wa opened. The card has been closed without modification. Ended the modernizations it has been restarted the computer, then has been launch the 05-054 patch of Internet Explorer. After a new restart, opening Microsoft Outlook, the system says PST was deleted! Any helps ? S. Is the PST simply renamed (possibly extension changed) or sitting in the Recycle Bin? "Nospam" <nospam@nospam.org> wrote in message news:O26RWCZBGHA.2920@tk2msftngp13....

delete permanently #2
Dear Sirs, I do not want to see some mail after deleting in Delete Items folder. Can I find any macro which can delete mail permanently? Best Regards Hi QT, please Press Shift + Del -- Ich habe nichts gemacht, gestern gings noch! Bitte in den Newsgroup antworten damit jeder etwas davon hat. Bravestar@Datenschutzministerium.de "QT" <web_tur@yahoo.com> schrieb im Newsbeitrag news:#0mbykcaEHA.3664@TK2MSFTNGP12.phx.gbl... > Dear Sirs, > > I do not want to see some mail after deleting in Delete Items folder. Can I > find any macro which can delete mail permanently?...

Delete Messages Folder Outlook 2003
When I try to emptly the 'Delete Files' folder in outlook 2003 I get the following message: -- "This messanging interface has returned an unknown error. If the problem persists, restart outlook."---- I have restarted outlook several times and have re-booted my computer a few times and I get the same message. Can anyone help me to resolve this situation? Ted Jamison <Ted Jamison@discussions.microsoft.com> wrote: > When I try to emptly the 'Delete Files' folder in outlook 2003 I get > the following message: -- "This messanging interface has retu...

Copying Bitmap #2
I've a CWnd derived class e.g. CWMPPlayer4. How do I copy the current displayed data from the CMPPlayer4 object into a CBitmap object? Depends on how the data is created and whether or not all information is displayed on the screen. For example, see my essay on Screen Capture on my MVP Tips site. But this only works if the image contains everything you need to see, and is not obscured by other windows. If the actual image is is larger, then what you would have to do is create a memory DC, select a bitmap into it, and then call your OnDraw handler to write into the bitmap. The catch...

Column names are 1,2,3,....
I just noticed today that the column names in my excel spreadsheets are no longer alphabetical, but are numerical. The column marked "1" is defined by excel as column "1C", and row "1" is defined as row "1R". How can I get the column names to change back to the alphabet? Thanks Hi! G! Use: Tools > Options > General Remove check from "R1C1 reference style" -- Regards Norman Harker MVP (Excel) Sydney, Australia njharker@optusnet.com.au Excel and Word Function Lists (Classifications, Syntax and Arguments) available free to good...

Macro: Find matching DATA, copy correspondently values into another list
Okey guys - please advise me on this. (There was unfortunately no quick response to my latest problem - and I begun to swim... However - that brought me out on deep VBA-water...again - and now need a life buoy (metaphorical spoken)). The core of my macro problem is to look for all the values in column A (Range A5:A??) in Sheet "BOARD" (not bored!!!) that match values in another list placed in column A in sheet "LIST". When finding the match I will copy correspondent celle.value in column D / sheet "BOARD" into column B in sheet "LIST" - this w...

Splitting multiple cell contents from 1st column into 4 columns
n my first column I have 4 cells (1-4) (5-8) etc. with general content. The content from each of these 4 cells needs to be placed in a separate column to make a list that I can sort etc. Example: COLUMN A 1 01-04-425-001 2 Heatherridge Road #301 3 Harry Smith 4 H25 Condo Fairfax Place 5 01-05-356-041 6 McGrath Street # 56 7 Mary Jones 8 B45 Condo Lemon Circle . . . . . . and so on and so on every 4 cells. I have hundreds of 4 cell descriptions. I just can't do this one by one. Can anyone help, PLEASE, PLEASE. I am really a novice at Excel though I use it for e...

Activate email column to hyperlinks
I have a colume of email addresses in an excel 2002 document. I need to make them active hyperlinks - How ? Microsoft instuctinos are useless here. can't they be converted in one batch to active hyperlinks so when the email address is clicked on, the email program opens in a fresh email ? Many thanks for any help http://www.mvps.org/dmcritchie/excel/buildtoc.htm#MakeHyperlinks -- Regards, Peo Sjoblom "DixieWins" <DixieWins@discussions.microsoft.com> wrote in message news:7F59C7F2-63DE-410B-B6FF-0EA29ECC8A35@microsoft.com... > I have a colume of email addr...

How can you bulk delete failed emails?
I have a client that uses a third party to "SPAM" messages out to the public from their email list out of CRM. They just sent me an Excel spreadsheet with a list of about 30 emails that failed on the marketing endeavor. Is there a way for CRM to look up these failed email addresses and remove them from the appropriate accounts so that they do not try to send to them again? write a custom application which looks for failed emails and deletes them using crm sdk. Then use windows task scheduler or create a service to call your application on a specified period, once a day or ev...

issue with ex2k7 ccr cluster and ntbackup
hi ng have a problem with my ex2k7 ccr cluster and ntbackup. because there is not a backup software available which support ex2k7, we use ntbackup for online backup. we backup every single database. the backup is running without problems and the eventlog seems to be clean but the logs will not deleted. on a single mailbox server, which hold the public folders, i see that ntbackup works fine and the logs are deleted after a succesful full backup. has anybody heard about such a behaviour? any hint will be appreciated. regards olaf Are you by chance backing up the passive cluster node with N...