Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-26-2015, 12:56 AM
dapeamel dapeamel is offline How to return the first cell in a row? Windows 8 How to return the first cell in a row? Office 2010 64bit
Novice
How to return the first cell in a row?
 
Join Date: Feb 2015
Location: sweden
Posts: 10
dapeamel is on a distinguished road
Default How to return the first cell in a row?


Hi guys

I use this code but I still dont get the first cell in the same column and row 1



see code below:

Code:
Sub Langauge_Combination() 


For Each sht In ActiveWorkbook.Worksheets
Set Rng = sht.UsedRange

Set MyRange = Rng
For Each MyCol In MyRange.Columns
For Each MyCell In MyCol.Cells
'MsgBox ("Address: " & MyCell.Address & Chr(10) & "Value: " & MyCell.Value)

If MyCell.Interior.ColorIndex = 23 Then

'MsgBox MyCell.Text

' Put code here

MsgBox "" & MyCell.End(xlUp).Text 'I DONT GET THE FIRST ROW WHY?


End If
Next
Next
Next

End Sub
See example file

also picture
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to return the first cell in a row? Search for multiple texts in cell, return specific text mariur89 Excel 4 12-14-2014 01:33 AM
Would like to return a row rather than a cell using VLookup canajun Excel 7 12-10-2014 01:03 PM
How to return the first cell in a row? Reference another workbook and return values from the same cell across multiple sheets/tabs lwls Excel Programming 5 11-08-2014 02:11 PM
How to return the first cell in a row? Assign the value of a cell as a cell reference of another cell in Excel 2010 - How to? bharathkumarst Excel 7 10-13-2014 10:25 AM
How to return the first cell in a row? Return cuurent time when another cell is updated zks Excel 6 01-22-2012 10:24 PM

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 03:28 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft