Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Writing a formula in code

sformlua = "=VLOOKUP(C" & activecell.row & _
",DatabaseData!A:B,2)"

--
Regards,
Tom Ogilvy


"Crystal" wrote in message
...
I'm writing a macro that will loop through the cells in a
selection and apply a formula only to the cells whose
backcolor is 36. The loop works fine.

When I hardcode the formula in: "=VLOOKUP(C9,DatabaseData!
A:B,2)" the cell reference to "C9" does not change as a
relative reference would. How to I get the cell reference
in A1 notation by using ActiveCell? I need the name of
the active cell (D9) minus one column to produce (C9).

Any suggestions would be greatly appreciated.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help with formula writing Soth Excel Worksheet Functions 3 July 2nd 09 06:27 PM
IS IT POSSIBLE IN EXCEL WITHOUT WRITING CODE. HARSHAWARDHAN. S .SHASTRI[_2_] Excel Worksheet Functions 14 February 4th 09 04:48 PM
Need help writing Code LeAnne Excel Discussion (Misc queries) 1 February 15th 08 03:27 PM
Can you call a Web Service from Excel 2007 without writing code? BigBadBubba Excel Discussion (Misc queries) 0 March 14th 07 03:32 AM
Please help Frustrating VBA code writing problem [email protected] Excel Programming 1 August 7th 03 05:23 PM


All times are GMT +1. The time now is 12:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"