LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Returning Cell Reference/link

This seems like it should be fairly simple, but for the life of me, I can
figure out the correct command. I'm writing a macro that loops through a
database comparing all rows and when the a statement is true, and if it is,
it adds a reference/link to the contents of Cell(y, r) to the current formula
of Cell(x, qr). This way, if Cell(y,r) changes later, Cell(x,qr)
automatically changes as well. The end result is each cell in column qr will
have formulas that are the equivelent of =SUM(B3,B12,B56).

Here is what I've got so far... "Ref" in the macro is simply what I wish the
command was, but unfortunately it doesn't exist...

Do While Cells(x, name).Value < ""
Do While Cells(y, name).Value < ""
If (Cells(x, name).Value = Cells(y, name).Value) Then
Cells(x, qr).Formula = Cells(x, qr).Formula + Cells(y, r).Ref
y = y + 1
Else
y = y + 1
End If
Loop
x = x + 1
y = 2
Loop

Thanks for any help you can offer. I hope I at least made a little sense in
my explanation... couldn't think how to better word it...
 
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
Reference to cell with text is returning #VALUE Jorist Excel Discussion (Misc queries) 6 March 25th 19 08:18 AM
Cell reference returning incorrect value JohnOC Excel Discussion (Misc queries) 2 April 9th 09 02:29 PM
Returning reference of frozen cell GilesT Excel Programming 5 June 25th 07 09:43 PM
Returning reference of frozen cell Pete at Sappi Fine Paper Excel Programming 4 August 18th 06 03:29 PM
Returning with cell on right/left of a reference Hellion Excel Worksheet Functions 1 June 5th 05 12:22 PM


All times are GMT +1. The time now is 09:04 AM.

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

About Us

"It's about Microsoft Excel"