Good morning,
I have a couple of documents (both attached). I'd like to transfer parts of one over to the other. The factors are the probe, accession #, phase in, and ignoring blanks.
My vision is that someone will pull up all of the spreadsheets (here called transfer test), and use the macro on the phase in doc (here called Heme Phase In). The macro would then transfer the scores and the signal patterns from the "score sheet" tab (same name as real form) to the "Phase-in summary" (same name as real form) into the correct row based on the accession number. It would know which scores need to transfer based on whether or not the "phase in" drop down is selected on the score sheet tab, and would cut out any scores that have a 0.
Relevant data
Signal patterns: top line of every probe box between columns G-Q. Every other row starting with G (G, I, K, M, O, and Q). example 1 would be G20, I20, K20, M20, O20, and Q20
Scores: go on the same columns as above, but need to pull from the "total row". example 1 would be G25, I25, K25, M25, O25, and Q25
If the "total row" for a column equals 0 then the entire column should not be transfered (mainly to conserve space). There will sometimes be 0s in between relevant columns.
The phase in boxes appear to the right of every probe in column V. There will not be more than one selected per phase in. To be safe, however, I'd like the probe name in column D to transfer to cell I6 on the phase in summary. (example 1 appears in cell D21).
The accession numbers appear in cell C5 of the score sheet. All accession numbers will already be entered into row B of the phase in summary.
Thank you very much for your help! Finding this community has been a godsend!
P.S. I have an idea how to transfer the data. I don't know how to ignore the 0 columns, and also find the "moving target" of the "phase in" drop down. Here is some transfer code generously given to me by a member of this community (not yet modified for this document):
Sub Transfer()
Dim OutSH As Worksheet
For Each wb In Workbooks
If wb.Name <> ThisWorkbook.Name Then
wb.Activate
Sheets("Summary").Activate
shtname = ActiveSheet.Range("a1").Value
currep = ActiveSheet.Range("B3").Value
Set OutSH = ThisWorkbook.Sheets(shtname)
Set findit = OutSH.Range("A:A").Find(what:=currep)
findit.Offset(0, 1).Resize(1, 19).Value = ActiveSheet.Range("B12:t12").Value
End If
Next wb
End Sub
Bookmarks