Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default can I use GO TO results in a formula?

start point: formula in col. B
directions: go to col. A, step upward 'til reach non-blank cell
end point: use contents of $A# inside the formula

I can physically find the required data using Go To (or even [End] +
arrow-up key)
but how would one write a macro to do this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default can I use GO TO results in a formula?

Try something like

Dim Rng As Range
Dim S As String
Set Rng = Cells(Rows.Count, "A").End(xlUp)
S = CStr(Rng.Row)
Rng(1, 2).Formula = "=$A$" & S

Or, more compactly,

Cells(Rows.Count, "A").End(xlUp)(1, 2).Formula = _
"=$A$" & CStr(Cells(Rows.Count, "A").End(xlUp).Row)



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"having eXceLed, I now want aXeS"
om wrote in
message
...
start point: formula in col. B
directions: go to col. A, step upward 'til reach non-blank cell
end point: use contents of $A# inside the formula

I can physically find the required data using Go To (or even
[End] +
arrow-up key)
but how would one write a macro to do this?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default can I use GO TO results in a formula?

Range("B100").Select
set rng = Cells(ActiveCell.Row,1).End(xlup)
activecell.Formula = "=Sum(A1:" & rng.Address(0,0) & ")"

--
Regards,
Tom Ogilvy

"having eXceLed, I now want aXeS"
om wrote in message
...
start point: formula in col. B
directions: go to col. A, step upward 'til reach non-blank cell
end point: use contents of $A# inside the formula

I can physically find the required data using Go To (or even [End] +
arrow-up key)
but how would one write a macro to do this?



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
When I enter a formula, Excel shows the formula not the results Pat Adams Excel Worksheet Functions 5 April 4th 23 11:18 AM
How do I view formula results intead of formula in excel? davidinatlanta Excel Worksheet Functions 4 February 7th 06 03:02 PM
CountIf formula results in the formula itself being displayed. NewKid Excel Worksheet Functions 9 December 21st 05 11:10 PM
View formula results instead of formula in 2003 version? Felicia Pickett Excel Discussion (Misc queries) 2 September 14th 05 12:14 AM
Evaluating results of a concatenate formula, as a formula dodger Excel Worksheet Functions 5 September 9th 05 01:55 PM


All times are GMT +1. The time now is 06:25 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"