i want the below function to pick data from row till Cell “H” however this function is picking up details upto the last used cell.
Here are the codes, please help on this.
Function getapproverdataHTML() As String
Dim datacolumn As Range
Dim datarow As Range
Dim R As Range
Dim C As Range
Dim str As String
sheets(2).Activate
Set datacolumn = Range("A1", Range("A1").End(xlDown))
str = ""
For Each R In datacolumn
str = str & ""
Set datarow = Range(R, R.End(xlToRight))
For Each C In datarow
str = str & "" & C.Value & " "
Next C
str = str & " "
Next R
str = str & "
"
getapproverdataHTML = str
End Function