Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Referencing a Cell in VBA


Hi All,

Below is a few lines of VBA from my spread sheet:

Function fnSMYS(strSteelGrade)
If Cells(4, 3).Value = "A25" Then
fnSMYS = 172.4
ElseIf (Cells(4, 3).Value = "A") Then
fnSMYS = 206.9
.....etc

As you can see it is a function and it is checking the value of cel
4,3 (or 4C) and then it assigns fnSMYS a value depending on what is i
4,3. In my spread sheet I have called cell 4,3 "Grade". How can
replace the line Cells "(4,3).Value" in VBA with a reference to th
name "Grade"?

Best Regards,

Aaro

--
Aaron197
-----------------------------------------------------------------------
Aaron1978's Profile: http://www.excelforum.com/member.php...fo&userid=3120
View this thread: http://www.excelforum.com/showthread.php?threadid=54624

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Referencing a Cell in VBA


Excellent. Thanks

--
Aaron197
-----------------------------------------------------------------------
Aaron1978's Profile: http://www.excelforum.com/member.php...fo&userid=3120
View this thread: http://www.excelforum.com/showthread.php?threadid=54624

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
Referencing Cell Next To Today's Date Cell Docktondad Excel Discussion (Misc queries) 5 May 16th 07 10:25 PM
VBA Cell Referencing Fastbike[_8_] Excel Programming 2 March 9th 06 10:04 PM
Cell referencing Gregory A. Wandless Excel Discussion (Misc queries) 3 April 25th 05 05:57 PM
Cell Referencing Silver Excel Discussion (Misc queries) 2 January 11th 05 05:24 PM
Cell Referencing Karen Howard Excel Programming 0 November 18th 03 02:19 PM


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