Extracting text from a column and placing into a separate column among all sheets in a workboook

hazarsky

New Member
Joined
May 4, 2020
Messages
1
Office Version
  1. 2013
Platform
  1. Windows
Hello,

I am looking for some help with some code that I don't know how to compile. I know literally nothing about VBA and am working my way through forums.
The scenario: I am merging worksheets from multiple workbooks into a single location. I am then filtering the data and am left with 2 columns on each worksheet (each sheet is labelled with a unique patient ID). I am left with column H as the "Nuc Change" and column L as the "Hint" in each worksheet. The format of column H is "X -> Y (z)" and I am trying to extract X, Y, and z into 3 columns. The caveat is that if "Hint" says not detected, then Y=X in this case. As well as if the third column reads "****" this indicates the allele is actually a Y,Y. These then need to be converted into a numerical code that reads as follows. X, X = 1, X, Y = 2, Y, Y = 3. This is then concatenated into 1 cell to form a unique ID. Is something like this even possible? I know it is quite complicated and I'm not sure where to begin. I have code for the merging of files, formatting and hiding unused columns but am stuck on just about the rest. I am using a Left Function with detection of last row but keep getting errors so cant move forward. Any help is appreciated. Honest feedback on whether this is doable is also appreciated.
 

Attachments

  • MergeFileFiltered.PNG
    MergeFileFiltered.PNG
    19.9 KB · Views: 5
  • Left Function.PNG
    Left Function.PNG
    7.2 KB · Views: 3

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,214,954
Messages
6,122,461
Members
449,085
Latest member
ExcelError

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top