Hi, All,
If someone could help, I'd really appreciate it,
I have about 24 Workbooks with 12-14 sheets that have a row which contains weights entered as formulas to display the total of two weights, e.g.,
Formula:
=1664+281
,
Formula:
=1820+281
, etc. Some cells in the rows are empty, so I'm trying to loop thru the ranges and parse out the two figures on separate lines, e.g. if Cell E2 has
Formula:
=1664+281
, I'd like to get E2 to have "1664" and E3 to have "281" as values. I've already figured out how to consolidate the rows from the various worksheets into one Sheet and replicate the rows for the parsed values, but trying to figure out the VBA is getting me stuck. I've tried the following code, could someone please have a look and see what I'm doing wrong? A sample workbook is also included with attached macro.
Sub ParseWeights()
Dim Cell
Sheets("SCALEWEIGHTS").Select
For Each Cell In Range("BLACLO").Cells
If Cell.Value <> Null Then
ActiveCell.FormulaR1C1 = "Left(InStr([2], [Cell.FormulaR1C1], [+]))"
End If
Next
End Sub
201201MonthlyHelp.xlsm
Thanks for any helpful suggestions!
Bookmarks