Not a expert in programming, but not a newbie either. Can understand the logic but miss the syntax sometimes. Have gone through post pertaining to copying and pasting a row from one sheet to another and tried multiple approaches. This should be a simple process.
I have one sheet with 6 cols of decimal numbers.
Picture1.gif
Then I have a second sheet that represents a binary equivalent of a decimal number.
Picture2.gif
The goal is to read a value (i.e. A1) on sheet Decimal and based on the value choose the corresponding row from sheet Binary and copy that row to a third sheet named TestCol1.
Used a Case Select statement which works but code in each case does not work (which now that I type it case may not be best), but be what it may.
Individual case code is:
Case 3
'Cut and Paste
Sheets(“Binary”).Rows(tmp).EntireRow.Select
Sheets(“Binary”).Rows(tmp).EntireRow.Copy
Sheets(outSheet).Cells(outputRow, outputCol).Select
Sheets(outSheet).Paste
'Set to read next Number
inputRow = inputRow + 1
'Set to output next row
outputRow = outputRow + 1
I have tried multible approches but keep getting error messages out of range (9) or 1004
Used Worksheets.Sheets(.......
changed to Worksheets.Sheets(.......)Range.(cells(tmp,inputCol),cells(tmp,inputCol+5).select or copy
Doesn't work.
Would someone please point out the elephant for me please.
Thank you
Bookmarks