Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Macro - msgbox vs. enter result in a cell??/


A kind soul wrote this subroutine to display the result of an equation
in a message box.

1) If I want to display the result of the equation in cell A2, instead
of the message box, how do I change the subroutine, below? what is the
code to actually enter the value in a cell?

2) If I want to continue down the columns (C, E, F) until there are no
more entries, how would I write that?? (size of the columns vary from
29-100 + entries)

Thanks

Dim vResult As Variant
vResult = IIf(Range("E2") = 0, _
"? RT = " & Format(Range("F2"), "###.00"), _
Range("C2").Value)

MsgBox vResult
End Sub

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
Enter value, convert, read result from same cell sjbegley Excel Discussion (Misc queries) 1 August 14th 09 12:41 AM
Enter data and display function result in same cell ChrisR Excel Discussion (Misc queries) 1 June 21st 06 12:15 AM
MsgBox in ComboBox Enter Event does not allow update Richard Excel Programming 1 March 3rd 06 08:15 PM
Enter a formula to return a result from a cell LMB New Users to Excel 2 December 4th 05 02:29 AM
Question: Cell formula or macro to write result of one cell to another cell Frederik Romanov Excel Programming 1 July 8th 03 03:03 PM


All times are GMT +1. The time now is 06:51 PM.

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"