Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple sub

Status
Not open for further replies.

klobes01

Technical User
Joined
Nov 1, 2007
Messages
2
Location
US
Hello,


I need the syntax to take the text from column c and column K which are the same "IBCM_BATT_PILOT3_N_BATTERY_PARAMETERS_CB_FROZEN_PTR"


and then replace it with two rows labeled

"BATT_PILOT3_N_BATTERY_PARAMETERS_CB_FROZEN"
and "BATT_PILOT3_N_BATTERY_PARAMETERS_CB_PTR"

I want all the other data the same.

How do I swap one row for two.
 




So are you saying that you have MANY different strings in column C?

If so, are they in the form...
[tt]
first_second_ ... _nextolast_last
[/tt]
resulting in
[tt]
first_second_ ... _nextolast
first_second_ ... _last
[/tt]



Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
yes,


I also need to call a function as well.


I need to split them into two rows as you've done above, and then I need to take a hexadecimal string in column J and take the 10th byte and perform the function on it in both instances. FROZEN uses byte 2 bit 2 and PTR uses byte 2 bit 4.

basically I need to parse from hex to binary and determine if above bits are populated or not and then leave a value in row M


 



Check out the Split function to parse the string. You can then reconstruct the values with the Underscore. Or you could use the InStrRev.

Use a technique like this to read the data...
Code:
dim r as range, lRow as long, wsOUT as worksheet
set wsOUT - sheets("Sheetwhereoutbutgoes")
lrow=1
for each r in range([C1], [C1].end(xldown))
   wsout.cells(lRow, "A").value = ......
next


Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top