Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Multiple cells or columns are selected instead of selected cell or | Excel Discussion (Misc queries) | |||
print selected columns not working | Excel Discussion (Misc queries) | |||
printing selected pages in one worksheet while working in another | Excel Discussion (Misc queries) | |||
Why aren't the exceptions I selected in WS Protection working? | Excel Worksheet Functions | |||
Working with a selected range | Excel Programming |