Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
efernandes67
 
Posts: n/a
Default Find the first Value in a Row and Retrieve the Header for That Column


Hi,

I need some help solve this problem.
Supose I have the array as in the file in attach.

I want to:
1) find the first value in the range A9:L9 (result: "1")
2) retrieve header for that column (result: "i")
3) find the next value in the range A9:L9 (result: "8")
2) retrieve header for that column (result: "l")

Best Regards,
Elio


+-------------------------------------------------------------------+
|Filename: FirstValueInaRow.pdf |
|Download: http://www.excelforum.com/attachment.php?postid=4240 |
+-------------------------------------------------------------------+

--
efernandes67
------------------------------------------------------------------------
efernandes67's Profile: http://www.excelforum.com/member.php...o&userid=17916
View this thread: http://www.excelforum.com/showthread...hreadid=502585

  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim May
 
Posts: n/a
Default Find the first Value in a Row and Retrieve the Header for That Col

In a standard module paste in:

Sub Foo()
Set Rng = Range("A9:L9")
For Each c In Rng
If c.Value = 1 Or c.Value = 8 Then
MsgBox "Your Header name is " & c.Offset(-8, 0).Value ' assumes your heade
Row = 1
End If
Next c
End Sub

"efernandes67" wrote:


Hi,

I need some help solve this problem.
Supose I have the array as in the file in attach.

I want to:
1) find the first value in the range A9:L9 (result: "1")
2) retrieve header for that column (result: "i")
3) find the next value in the range A9:L9 (result: "8")
2) retrieve header for that column (result: "l")

Best Regards,
Elio


+-------------------------------------------------------------------+
|Filename: FirstValueInaRow.pdf |
|Download: http://www.excelforum.com/attachment.php?postid=4240 |
+-------------------------------------------------------------------+

--
efernandes67
------------------------------------------------------------------------
efernandes67's Profile: http://www.excelforum.com/member.php...o&userid=17916
View this thread: http://www.excelforum.com/showthread...hreadid=502585


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



All times are GMT +1. The time now is 06:57 PM.

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"