The W
Views: 97817832
Main | FAQ | Search: Y! / G | Calendar | Color chart | Log in for more!
30.7.14 1440
The W - Internet & Computers - Excel & Visual Basic Question.
This thread has 5 referrals leading to it
Register and log in to post!
Thread rated: 2.79
Pages: 1
(711 newer) Next thread | Previous thread
User
Post (2 total)
Jobberman
Kishke








Since: 2.1.02
From: West Palm Beach, FL

Since last post: 103 days
Last activity: 32 days
#1 Posted on | Instant Rating: 2.24
From reading this forum for a few years, I know there are some very intelligent people around here. Hopefully one can help a bit.

I am trying to put a little piece of code in a visual basic program that will check a specific cell in an MS Excel spreadsheet. If the cell is empty, it will generate a random number and insert it. If the cell already has a value in it, no change would be made. I know very, VERY little as far as programming goes, so searches for this always led me to places way over my head.

Any help would be appreciated,

Thanks.
Promote this thread!
whatever
Lap cheong








Since: 12.2.02
From: Cleveland, Ohio

Since last post: 9 days
Last activity: 49 min.
#2 Posted on | Instant Rating: 3.35
This is a sample I used in some VBA code embedded in an Excel spreadsheet.

This line checked if the cell value was blank. You could use the line in an "If-then" setup to set the .value parameter to the random number.

Sheet#.Cells(X, Y).Value = ""

where
# = the sheet number in Excel,
X = row number on the sheet
Y = column number on the sheet

Hope this helps!




"Lita holds a Stone Cold Steve Austin home pregnancy test. What will the Bottom Line say? “Hell Yeah” or “Eh-EH”?" - Raw Satire, 6/15/04
(Apparantly ours said "Hell Yeah", 03/08/05)

Thread rated: 2.79
Pages: 1
Thread ahead: Hotmail trouble, or just me?
Next thread: AOL IM Invisibility
Previous thread: Ticketmaster tips
(711 newer) Next thread | Previous thread
I keep hearing non-specific horror stories about it and to avoid it at all costs. Any W's here have it and what is your your experience with it so far?
- JST, Latest MSN version (2010)
The W - Internet & Computers - Excel & Visual Basic Question.Register and log in to post!

The W™ message board

ZimBoard
©2001-2014 Brothers Zim

This old hunk of junk rendered your page in 0.056 seconds.