ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Arguments of Excel functions (https://www.excelbanter.com/excel-programming/315576-arguments-excel-functions.html)

soonh

Arguments of Excel functions
 
I like to program a function which will read 64 of single digit hex numbers
from 64 consecutive rows of the same column and concatenate them all as a
single text string. Anyone has any idea what is the best way to do this?

crispbd[_16_]

Arguments of Excel functions
 

Dim HexString as String, Counter as Long, InterestedColumn as Integer

InterestedColumn = <whatever column #

For Counter = 1 to UsedRange.Rows.Count
HexString = HexString & Cells(Counter, InterestedColumn).Value
Next Counte

--
crispb
-----------------------------------------------------------------------
crispbd's Profile: http://www.excelforum.com/member.php...fo&userid=1088
View this thread: http://www.excelforum.com/showthread.php?threadid=27465


Niek Otten

Arguments of Excel functions
 
Please stay in your original thread.
What do you call a single digit hex number? Why is it hex?
You can pass a range of 64 cells to a function:

Function AddCells(a As Range) As String
Dim i As Long
For i = 1 To 64
AddCells = AddCells + CStr(a(i))
Next i
End Function


--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"soonh" wrote in message
...
I like to program a function which will read 64 of single digit hex numbers
from 64 consecutive rows of the same column and concatenate them all as a
single text string. Anyone has any idea what is the best way to do this?





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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com