Hi Andrew87..
Just another demo:
60 I copy from one cell
and
70 I paste to the adjacent one ( I maintain all Formats )
Then I
90 overwrite the Value only in the Cell that i am pasting to with the absolute Value from the original Cell, whose format and Value remains as it was
Sub testie2() ' http://www.excelforum.com/excel-programming-vba-macros/1161452-paste-as-absolute-value.html
10 Dim row As Long
20 Let row = 25
30 Let ThisWorkbook.Worksheets("Sheet1").Range("C" & row).Value = -6391
40
50 ' Copy and Paste all including all formats
60 ThisWorkbook.Worksheets("Sheet1").Range("C" & row).Copy ' Range Copy Method
70 ThisWorkbook.Worksheets("Sheet1").Range("D" & row).PasteSpecial xlPasteAllUsingSourceTheme ' Range PasteSpecial Method with one of the many Options
80 ' Overwrite Cell value with Cell absolute value
90 Let ThisWorkbook.Worksheets("Sheet1").Range("D" & row).Value = Replace(ThisWorkbook.Worksheets("Sheet1").Range("C" & row).Value, "-", "", 1, 1) ' Replace( In -6391 , "-" with , "" , start looking at first character , just do it to the first occurance )
100 '
' http://www.eileenslounge.com/viewtopic.php?f=27&t=22512
' http://www.excelforum.com/showthread.php?t=1144116&p=4414189&highlight=#post4414189
' http://www.excelforum.com/showthread.php?t=1114014&page=3&p=4256195#post4256195
' http://www.mrexcel.com/forum/excel-questions/828241-visual-basic-applications-autofilter-specialcells-xlcelltypevisible-copy-only-values-not-formulas.html#post4043472
' http://www.mrexcel.com/forum/excel-questions/785462-visual-basic-applications-copy-value-paste-worksheet-same-name-value-3.html#post4071766
' http://www.excelforum.com/excel-programming-vba-macros/1159780-syntax-problem-with-intersect-statement.html#post4504411
' http://www.excelforum.com/tips-and-tutorials/1108643-vba-column-letter-from-column-number-explained.html
' https://app.box.com/s/lts3h2ejf33yj2i2xmaq5zrq784qwwl9
' http://www.excelforum.com/showthread.php?t=1154829&page=2&p=4483347&posted=1#post4483344
End Sub
_............................
or you just want
Session.findById("wnd[0]/usr/txtBSEG-WRBTR").Text = Replace(ThisWorkbook.Worksheets("Sheet1").Range("C" & row).Value, "-", "", 1, 1)
or you just want line 90 on its own
Possibly the confusion is arising as you are using the word Paste. Maybe you are saying that you want to pass the absolute value of a cell to something. Or in English , you want to give the absolute value from a cell to something.
The word Paste tends to suggest the various Paste or Paste Special operations in VBA , which might send a VBA person off in the wrong direction of thinking. I expect that is what happened initially with Glenn
Alan
Bookmarks