LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Need formula or VBA code to find integer

I can't get Claus's formula to work. But here's a variant on Claus's suggestion: use this formula, also entered with Ctrl+Shift+Enter:

=INDEX(A1:A26,MIN(IF(A1:A2610, ROW(A1:A26),100)))

(It will show #REF! if there's no number 10 in the range.)

Howard

On Sunday, 22 June 2014 23:35:01 UTC+10, wrote:
On Tuesday, June 3, 2014 8:47:39 AM UTC-4, jackie2828 wrote:

Please help. I need an Excel formula or a VBA code that will find the




first (and only the first) integer greater than the number 10 in a set




of numbers 1-26 A1:A26, any help would be very much appreciated. Thanks




in advance.




















--




jackie2828




Jackie please try this code.



Sub test()





For i = 1 To 26

If Cells(i, 1).Value = 10 Then

MsgBox Cells(i, 1).Address

Cells(i, 1).Select

End If

Next



End Sub


 
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
Formula, Macro, or VBA code to find and insert Keith Excel Worksheet Functions 3 October 2nd 09 08:21 PM
VBA code optimization - why using long instead of integer? Thao Excel Programming 4 August 28th 08 08:43 PM
adding an integer to a string in code pspyve[_8_] Excel Programming 2 August 15th 06 12:45 AM
Check if a value is an integer using VBA code Rayo K Excel Programming 5 August 3rd 06 09:42 PM
Find lowest missing integer in a column Casey[_109_] Excel Programming 2 June 19th 06 06:10 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"