Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Linked cell location in VBA

Seth,

Maybe...
Sub DoTheTwist()
If Worksheets("Data").Range("C10").Value = "N.G." Then
Worksheets("Matrix").Range("X62").Value = "N/A"
End If
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Seth"
wrote in message
I have two sheets I'm working with, called "Data" and "Matrix". I have a
simple macro to evaluate a cell (C10) in Data, and if the statement is true,
then I want to change a cell in Matrix to the text "N/A". Here's my problem,
the cell location I want to change is contained in cell C8 in Data and looks
like this:
=Matrix!$X$62

So far I have...

Sheets("Data").Select
For i = 3 To 149
If Cells(10, i) = "N.G." Then
????? = "N/A"
End If
Next

Thanks in advance!
Seth
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Linked cell location in VBA


Sub FindThePlaceWeWant()
Dim strLocation As String
Dim lngCol As Long
Dim N As Long
Dim i as Long

lngCol = 3
i = 8
N = InStr(1, Cells(i, lngCol).Formula, "!", vbTextCompare) + 1

strLocation = Mid$(Worksheets("Data").Cells(i, lngCol).Formula, N, 255)
Worksheets("Matrix").Range(strLocation).Value = "N/A"
End Sub
--
Jim Cone
San Francisco, USA
http://www.officeletter.com/blink/specialsort.html





"Seth"
wrote in message
I may not have been clear, I'm trying to get the cell location which is in a
linked cell, then using that location add text to another cell. The cells
that contain the locations are in row 8 (C8, D8, E8...) so I can't hardcode
a location into a function.

"Jim Cone" wrote:
Seth,

Maybe...
Sub DoTheTwist()
If Worksheets("Data").Range("C10").Value = "N.G." Then
Worksheets("Matrix").Range("X62").Value = "N/A"
End If
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Seth"
wrote in message
I have two sheets I'm working with, called "Data" and "Matrix". I have a
simple macro to evaluate a cell (C10) in Data, and if the statement is true,
then I want to change a cell in Matrix to the text "N/A". Here's my problem,
the cell location I want to change is contained in cell C8 in Data and looks
like this:
=Matrix!$X$62
So far I have...

Sheets("Data").Select
For i = 3 To 149
If Cells(10, i) = "N.G." Then
????? = "N/A"
End If
Next
Thanks in advance!
Seth


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
Linked Workbooks - change in file location MeMe Links and Linking in Excel 1 January 6th 10 08:12 AM
Locking linked file location in a formula ScottL Excel Discussion (Misc queries) 0 July 9th 07 07:50 PM
Find/Replace Linked Cells Prompts File Location Inquisitive1 Links and Linking in Excel 4 October 20th 05 01:40 PM
Utility to change location of linked tables? Laurel New Users to Excel 1 August 6th 05 04:50 PM
Linked cell location of hyperlink Jerry Excel Worksheet Functions 1 December 20th 04 05:01 PM


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