Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Referencing Cell Next To Today's Date Cell | Excel Discussion (Misc queries) | |||
VBA Cell Referencing | Excel Programming | |||
Cell referencing | Excel Discussion (Misc queries) | |||
Cell Referencing | Excel Discussion (Misc queries) | |||
Cell Referencing | Excel Programming |