LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Code Does not Realise equal values


Hi there
The problem with this line : the code does realise that TextBox2.Value
realy equal ws.Range("A65536").End(xlUp).Value.......why is that ?? any
idea


Code:
--------------------
If TextBox2.Value = ws.Range("A65536").End(xlUp).Value Then
ws.Cells(r, Exp) = TextBox1.Value

--------------------



Code:
--------------------
Private Sub CommandButton1_Click()
Dim r As Long, Exp As Long
Dim ws As Worksheet

Set ws = Worksheets("sheet1")
r = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row

'*Exp Name
Exp = ThisWorkbook.Sheets(1).Cells.Find(what:=TextBox1.V alue, _
LookIn:=xlValues, LookAt:=xlPart, _
SearchOrder:=xlByColumns, SearchDirection:=xlNext).Column

If TextBox2.Value = ws.Range("A65536").End(xlUp).Value Then
ws.Cells(r, Exp) = TextBox1.Value
Else
With ws
.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0) = TextBox2.Value
.Cells(r, Exp) = TextBox1.Value
End With
End If

End Sub
--------------------


--
helmekki


------------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...fo&userid=6939
View this thread: http://www.excelforum.com/showthread...hreadid=487072

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Separating equal values Darren Charts and Charting in Excel 3 January 22nd 10 01:38 PM
Separating equal values Darren Excel Worksheet Functions 2 January 22nd 10 05:53 AM
Ranking Equal Values LiAD Excel Worksheet Functions 1 January 9th 09 12:06 PM
Add different values that equal 1 on a row Add sum of different values Excel Worksheet Functions 2 August 7th 08 04:52 PM
SOS VBA Code Emergency: need to copy tell to empty cell direct below where values in adjacent cells in different column are equal to each other. Steven Rosenberg Excel Programming 4 August 5th 03 05:05 AM


All times are GMT +1. The time now is 11:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"