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

How to run Excel Table function in VBA

Status
Not open for further replies.

hrm1220

Technical User
Aug 31, 2005
134
US
I'm trying to have VBA run Excel's table function, but I don't know where to start or if it's possible. Any suggestions?

Thx
 




Hi,

Almost any spreadsheet function can be used in VBA...
Code:
sValue = application.function([i]arg list...[/i])
for instance, the MATCH function...
Code:
iOffset = application.match(lookupvalue, range("lookuprange"), 0)


Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
I appreciate the help, but I think I used the wrong word or I'm not understanding your response.
It's the table that you need to go through on the toolbar in excel (Data,Table), then select the cell you want to reference (either "Row input cell:" or "Column input cell:")
 
Thx for the input Skip. I figured it out.

Selection.Table Columninput:=Range(range)

 





I would recommend using a distince range rather than Select...
Code:
Range(OtherRangeAddress).Table Columninput:=Range(range)

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top