# Posts by gjwilson1216

• ## Help Extracting Data From String

James,

Works perfect thank you! I don't think I would've ever got what I needed on my own. I'm glad its raining here today, I can spend the afternoon learning the Next and Search formula you came up with.

Grant

• ## Help Extracting Data From String

Hello,

I am having a problem working a formula to get the data I need. I have attached a test spreadsheet.

The raw data comes in on column A and I need the values between the <value> and </value> text for each cell. There can be up to 5 <value> and </value> entries in each cell of raw data so I need up to 5 columns of values for each raw data entry.

My approach -

Figure out how many value and /value entries were in each cell of data which is my column G

Then figure out in which potential columns there was value and /value data in - For instance in cell A9 there is data between the values for Invoiced and Hours so I need blank cells in R9, T9, and V9, 20 in cell S9, and 86 in cell U9.

So my idea was to get find the location of the first <value> and first </value> by using Find in M9 and N9 and then I was going to attempt to use Left or some combo using left, right, mid, ect to get the 20. However 20 is 2 characters and there is a 10 character difference in the values in M9 and N9 and the entries will never have a fixed number of characters it could be anything between 2 and 40 characters.

I hope I have made it somewhat clear of what I need help with. I know my skill level and I will need help with how to extract the first 2 potential value and /value combos, from there I am sure I can figure out how to get the value in the remaining combos if there is data to extract.

roster test.xlsx

Grant

• ## Excel VBA Userform Keeping a running total of textboxes formatted to 2 decimal places

Hello,

I have a simple userform with text boxes that I need added together, an employee enters a job number then the hours on the job then tabs to the next row. I have a check programmed that the employee can't submit the form until the total hours they worked equals the total hours for all the jobs they entered. That works. What I am trying to do now is add a visual that totals the hours they have entered so far. This also works until a fraction is entered. No matter what I try - the textbox that I use for the total will not display to 2 decimal places.

I have attached a sheet. There are 2 hours columns, this is a manufacturing company and there can be machine hours that we need kept track of as well, so the employee enters the gross time, and the form will then subtract the unattended hours. Other than that I think its pretty self explanatory. What I am looking for is the Hour15 and Ex15 have a running total and those along with grand be displayed to 2 decimal places.

The other thing I could not find a work around for, is that to keep a running total I had to populate all the boxes with zeros if they were still blank. If there is a better way to do that I am all for it.

Thank you.