Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
chip_pyp
 
Posts: n/a
Default simple i am hoping with macros

simple macro help. in my macro i have this line :
entry2 = InputBox("What kind of modem is it?")
If entry2 = "" Then entry2=

but i'm stuck on the last part. what i am trying to accomplish here is if
the user leaves the input box blank then entry2 will equal the vaule of the
cell in the row above it in the same column....for example-
user leaves input box blank so in c3 the value will be that of b3
  #2   Report Post  
Posted to microsoft.public.excel.misc
Debra Dalgleish
 
Posts: n/a
Default simple i am hoping with macros

You can subtract one from the row number that you've calculated, and use
the entry in that row. Based on the macro you posted previously:

If entry2 = "" Then entry2 = Cells(nextrow - 1, 2).Value


chip_pyp wrote:
simple macro help. in my macro i have this line :
entry2 = InputBox("What kind of modem is it?")
If entry2 = "" Then entry2=

but i'm stuck on the last part. what i am trying to accomplish here is if
the user leaves the input box blank then entry2 will equal the vaule of the
cell in the row above it in the same column....for example-
user leaves input box blank so in c3 the value will be that of b3



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

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
Why do macros show up while opening document, but were deleted? Ralph Orth Excel Discussion (Misc queries) 6 February 16th 06 07:07 PM
Excel crashes while opening excel file imbeddied with macros ct2147 Excel Discussion (Misc queries) 0 December 30th 05 09:05 PM
VBA Switching Between Macros Jeff Excel Discussion (Misc queries) 4 November 5th 05 12:45 AM
macros on one page frendabrenda1 Excel Discussion (Misc queries) 1 October 24th 05 12:18 PM
calling a series macros with a marco gerry405 Excel Discussion (Misc queries) 0 October 18th 05 01:23 PM


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