Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Working with a cell in a selected row



If having selected Row 5, I want my macro to evaluate Range("C5')'s
value. If it is found that it is equal to "", I want to then make it
equal to Range("D17")'s value.

Hope this is clear

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Working with a cell in a selected row

I'm not sure why row 5 being selected makes a difference.

but one way:

with activesheet
if .range("c5").value = "" then
.range("c5").value = .range("d17").value
end with



kls wrote:

If having selected Row 5, I want my macro to evaluate Range("C5')'s
value. If it is found that it is equal to "", I want to then make it
equal to Range("D17")'s value.

Hope this is clear

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Working with a cell in a selected row


Click any Row Header and then Run:

Sub tester()
With Selection
If .Columns(3).Value = "" Then
.Columns(3).Value = Range("D17").Value
End If
End With
End Sub

Careful with the Hard-coded D17 Reference Above;

HTH


"kls" wrote in message
...


If having selected Row 5, I want my macro to evaluate Range("C5')'s
value. If it is found that it is equal to "", I want to then make it
equal to Range("D17")'s value.

Hope this is clear

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



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
Multiple cells or columns are selected instead of selected cell or Mikey Excel Discussion (Misc queries) 1 April 29th 09 09:48 PM
print selected columns not working SLP Excel Discussion (Misc queries) 2 January 13th 09 02:22 PM
printing selected pages in one worksheet while working in another BROCK8292 Excel Discussion (Misc queries) 0 March 9th 07 01:38 AM
Why aren't the exceptions I selected in WS Protection working? valverax Excel Worksheet Functions 1 December 13th 05 08:16 PM
Working with a selected range OkieViking Excel Programming 3 June 10th 04 07:21 PM


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