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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. nicoh99

    Convert/Remove RTF text info from SQL text field

    George, Thanks for pointing me in the right direction. I was getting close in SQL server using the following in my column field: REPLACE(REPLACE(REPLACE(SUBSTRING(CONVERT (VARCHAR(400), dbo.EmployeeNotes.Notes), 101, 100), '\par }', ''), CHAR(10), ''), CHAR(13), '') I don't think this was...
  2. nicoh99

    Convert/Remove RTF text info from SQL text field

    Hi guys, (This is somewhat of a revamped version of a previous question I posted. I had mistaken the RTF formatting as something to do with Collation) I have a text field(notes) in SQL Server that is storing the data with all of the rtf formats. {\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0...
  3. nicoh99

    Pulling text into Excel from SQL text field with Collation

    Hello, I have a text field(notes) in SQL Server that has the Collation set to <database default>. When I query the notes field I get the notes text along with the collation info. {\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 MS Shell Dlg 2;}} \viewkind4\uc1\pard\lang1033\f0\fs17 test comments...
  4. nicoh99

    Get a SELECT CASE range from an Excel cell

    PHV - yes, I agree. Good catch.
  5. nicoh99

    Get a SELECT CASE range from an Excel cell

    Lengthy, yes, but it gets the job done and I do not notice a lag when I run the code. With those two criteria being met, I'm happy.
  6. nicoh99

    Get a SELECT CASE range from an Excel cell

    Not sure how well it will post over, but here it is: i = 8 If recExists = True Then Do Until Range("G" & i) = "End" If Len(Range("G" & i)) > 4 Then If Mid(Range("G" & i), 5, 1) = "," Or Mid(Range("G" & i), 6, 1) = "," Then arrayRange = Split(Range("G" &...
  7. nicoh99

    Get a SELECT CASE range from an Excel cell

    Skip, At this point, I think you are just being an ass. I tried to have respect and tact even when you replied back with rude remarks. It looks like you've been a member on here since I was a sophomore in college, so I'm not claiming to know more or how to program better than you. I realize...
  8. nicoh99

    Get a SELECT CASE range from an Excel cell

    OOPS, SUB VAL() FOR ISNUMERIC()
  9. nicoh99

    Get a SELECT CASE range from an Excel cell

    I think we are getting close. The Split works great, but it is still like I am comparing a text to a numeric. Also (not sure if it makes a difference in this case) I am attempting this in a select case statement and not a select sql statement. It would kind of be like: matchToMeVal = 5000...
  10. nicoh99

    Get a SELECT CASE range from an Excel cell

    I looked at going this route because: 1. Only one person will be using this. They are very capable of putting in the correct values, ranges, or whatever you would like to refer to them as. 2. More than likely, they won't need to be changed, but just in case, I'd thought it be nice to have that...
  11. nicoh99

    Get a SELECT CASE range from an Excel cell

    Skip, I'm not sure what else to tell you as far as my intent. I'm sorry if I came off as rude, I have been stewing over this issue since last night and it has really got me flustered. I figured there would be an obvious easy answer that I was just overlooking and someone else would say, hey...
  12. nicoh99

    Get a SELECT CASE range from an Excel cell

    (1,2,3,4) IS a range when used in a Case Statement as a criteria SELECT CASE arrayVariable Case 1,2,3,4 Do something if arrayVariable is in the RANGE 1,2,3,4 Case 5 to 8 Do something else if arrayVariable is in the RANGE from 5 to 8...
  13. nicoh99

    Get a SELECT CASE range from an Excel cell

    The purpose is to have somewhat of a floating Select Case statement so that way if I need to loop through 20 cells or 100 cells, I can do that while also giving the user the flexibility to change the range criteria in any given cell (which would in turn "update" the case criteria).
  14. nicoh99

    Get a SELECT CASE range from an Excel cell

    Basically, I'm just trying to figure out how to take a value or range from an Excel cell: Example G1 contains 1,2,3,4 G2 contains 5 to 15 G3 contains 16 and plug it into a SELECT CASE statement (in the Case = area)where it is not plugged in as a single string, but as a range or value. With...
  15. nicoh99

    Get a SELECT CASE range from an Excel cell

    Skip, I was just using A1 as an example. I have different ranges in different cells (G1, G2, G3...). I have to use code because I am connecting to a sql server database. I must admit I am not very good at explaining things, so instead of an example, here is a snippet of my actual code. For...
  16. nicoh99

    Get a SELECT CASE range from an Excel cell

    Hey Skip, The reason I am trying to pull this info from an Excel cell is so the end user can change the ranges on demand. I am pulling an account number from a database and then looping through the excel cells to get the ranges to determine where to plug in the data. Thanks, Nic
  17. nicoh99

    Get a SELECT CASE range from an Excel cell

    Hey guys, I am trying to pull a range from an Excel cell and plug it into a SELECT statement in my VBA code. For example, cell A1 has 33,34,35 in it. Sample Code: exampleNum = 34 Select Case exampleNum Case Range("A1").Value EXanswer = "Yes" Case Else...

Part and Inventory Search

Back
Top