Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default loop until vlookup true

If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Helmut" wrote in message
...
Hi Don,
No, let me explain:
Worksheet "Data" has several Tables. Table_3 has all the Kupa-numbers and
names.
On Worksheet "Input" I run the macro where people input the Kupa-number.
I want the macro to check if the number input is contained in Table_3.
If no, give chance to input another number and check
If yes, put number in specific Cell and continue with the rest of the
macro.
Hope this clerifies...
Helmut

"Don Guillett" wrote:

If the intent is to fill in a number where missing then

for each c in range("c2:c22")
if len(application.trim(c))<1 then
c.value= 1099075
end if
next c

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Helmut" wrote in message
...
I need code which will do the following:

When I input the Kupa number i.e. 1099075 it needs to verify that this
code
exists on table_3 when it does not exist i.e. vlookup=FALSE, then I
need
to
loop through beginning and ask person to input correct Kupa number.
When
no
longer FALSE, then put number: Range("F2:G2").Select //
Range("F2:G2").Value
= Account

' Input Kupa Account Number

Dim Message, Title, Default, Account

Message = "ìäëðéñ îñ' ä÷åôä ùì äòåáã" ' Set prompt.
Title = "Input Box" ' Set
title.
Default = "109xxxx" ' Set
default.

' Display message, title, and default value.
Account = InputBox(Message, Title, Default)

------------------------
If WorksheetFunction.VLookup(Account, Table_3, 2, False) = False Then

loop-code until number in table
------------------------
Range("F2:G2").Select
Range("F2:G2").Value = Account

Thanks


.


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
VLookup to bring in not true data. Sarita Excel Discussion (Misc queries) 3 April 29th 10 07:05 AM
VLOOKUP Range_lookup TRUE Pekka Numminen New Users to Excel 6 February 21st 10 10:39 AM
Getting the next higer value with Vlookup - True getu32 Excel Programming 5 February 3rd 10 11:57 AM
Vlookup to return the next true value Donna Excel Discussion (Misc queries) 2 October 13th 09 09:14 PM
For...Loop to verify at least one checkbox = True RyanH Excel Programming 2 May 13th 08 03:43 PM


All times are GMT +1. The time now is 02:21 AM.

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"