Using Relative Excel Spreadsheet References in Vba macro

July 20, 2009 by vba excel
Filed under: Excel Spreadsheet, Excel Vba 
Sponsor

Excel Vba Using Relative Excel Spreadsheet References in Vba macro [Q]
I want to move the contents of excel spreadsheet cell (in an array) when I know its column and relative row number using excel vba macro. The requested cell (date & time format) is in Column D and its relative row # is in cell E5. I want to move the contents of this cell to cell B1. The following is a sample of the table:

Col D
7/16/2009 23:23:57
7/17/2009 4:10:07
7/17/2009 5:40:25
7/17/2009 20:58:30
7/17/2009 23:22:49
7/18/2009 3:00:51
7/18/2009 5:58:52

I’ve tried various approaches to specify the relative cell’s location so I
can move its contents but with no success. Help. Thanks for your assistance.

Excel Vba Using Relative Excel Spreadsheet References in Vba macro [A]
Do you mean you want to add one to whatever is in E5 excel spreadsheet cell? Is so…

Range(”B1″).Value = Cells(Range(”E5″).Value + 1, “D”).Value

  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google
  • E-mail this story to a friend!
  • Live
  • MisterWong
  • Propeller
  • StumbleUpon
  • Technorati
  • TwitThis
  • YahooMyWeb
  • Print this article!

Rate This Tips:

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...


Incoming excel search terms

spreadsheet références,search in excel sheet using range vba,excel macro relative position,excel spreadsheet reference copy macro,excel vba formula relative reference,excel vba relative cell reference,excel vba relative reference,excel vba spreadsheet name,macro excel move cell relative reference find,relative excel,relative reference vba,relative value in excel,vba spreadsheet name,,add column in excel sheet using macro,cells vlaue vba excel relavite,copy 2 columns using relative reference in a macro,copy formulas without reference to other workbook macro,copy worksheet to new workbook relative referances,excel date functions cell references,excel macro add 1 to value,excel macro relative reference formula,excel reference relative another spreadsheet,excel relative,excel relative row macro,excel relative value,excel relative worksheet reference,excel vba references 2009,excel vba refrence cell based on its content,excel vba relative,excel vba relative row,macro excel cell reference,macro spreadsheet,mss,relative range vba,relative reference excel vba,relative reference in excel vba,relative reference macro,relative reference macro copying a range,relative value in excel macro,relative worksheet reference excel,row column references in excel vba,spreadsheet relative value,using cell value to indicate range in another worksheet macro excel,using relative excel,using relative references in vba,vba excel copy range based on cell value,vba excel relative,vba excel relative position,vba excel relative references



Related Excel Tips

Comments

Have another excel answer or questions for this problem ?
Feel free to post it here..