Monday 15 June 2015

vba - Split an Excel range into single cells -


In Excel 2010 I have a VBA function that searches for a worksheet and gets a match based on three values . Once this match is found, it gives a limit that is a whole line of data. Now in a cell in a Excel worksheet, I call that function. Using a formula, I can divide that range into separate cells. It will basically have to find the row and then paste the cells starting from the calling cell. After using each cell, a cell index function such as

        A2 = Index (A1, 1,1) A3 = Index (A1, 1,2) A4 = Index (A1, 1,3)   

In search of any suggestion I could take an oath that there was a non-VBA function that I could use to split a border into individual cells.

Edit with example: I have a lot of data in my main worksheet and there are some errors in this, along with the errors I see in another worksheet. The main worksheet position, height, width, weight, sheet, m, d, z, e ok, 1, 2, 5, 100, 1, 2, 7, tampa is fine, 1, 2, 8, 102, 7, 9, 8 is okay, 1, 2, 9, 104, 5, 7, 5 error, 1, 2, 6, 8, 7, 0

The combo of height, width, and weight is unique, but the supporting woocheet is similar to the main but there is data which is missing. OK <1> / Pre>

So in short, I want to get involved in height, width and weight, but for those people who have an error, the names of the helpful worksheet will be different but this is pre-calculated. I have written code for carrying three specific situations, go to the helpful worksheet, create a match and then join the mailing line to return the range object.

  Function GetMyRange (h, wd, wt, sht) as the range 'match here end function   

This works as I do something Can establish debug statements and I am making correct matches, though how do I take my range objects back to the main worksheet and put each object in "different" elements of the range object?

Not very clear about your case but I have it ..

This will be example, for example, to extract the multiple range in a single category. RS range = Range ("A1: A8") in the form of Dim SplitRange () Dim RN Range DimC RN cell MSBBX Strasse (Cro for each C)

  , C. column) Next End Sub Function Strange (Biline NRO as Single, BY Val NCL as Single) String DM CC as String DM NC, NRE, NDIRRS Integer CC = "ABCDEFGHIJLLMNAPQRTUV XX "NC = Lane (SC) NREEST = NCL Mod NC NDIRR = (NCOL - NREEST) / NC J. NDIRAS & gt; 0 then strage = mid (SC, NDIRR, 1) strage = strage & amp; Middle (SC, NRE, 1) & amp; Format (nRow) End Function   

Hope this help and everyone needs something like this ..

No comments:

Post a Comment