lmao! OK, this is working - Finally. Thanks a lot skip. [buying virtual beer]
Just a note: I had actually tried that too and gotten an error as well. Just now I realized I had not also updated the other instance of UsedRange. oye
k = k & Intersect(c.EntireColumn, [highlight...
I'm still playing with this. Now, I get a Compile error: Argument not optional on
For Each c In Intersect(rng.EntireRow, , UsedRange)
Sub ExCheck()
Dim rng As Range, Cel, ms As Worksheet, ws As Worksheet, k, c As Range
Set ms = Sheets("Search")
Application.ScreenUpdating = 0
With ms...
So, I tried a bunch of ways of doing this (I thought this was close) but I'm getting run-time error '424' Object required in my loop (For Each c In Intersect...)
I think I suck at this. lmao
If ws.Name = "Sheet1Name" Then
With ws.Range("C:C") 'id...
Sorry for not answering, Skip. If I understand what you're suggesting, that would mean people would be looking at the sheet with all the data. That sheet will actually be hidden and locked, so I need the results to appear on the search sheet.
When I execute my code and the search finds the search value:
it returns the value from column C (the search value) into D3 (of the Search worksheet)
it returns the value from column D of the same row into C3 (of the Search worksheet)
I can easily return the Y's that may appear in any of the...
Hi Skip. Here's the code. It's similar code that I've used in the past (and I am re-purposing) so I will likely have to modify it further, but it's a starting point for me.
Sub ExCheck()
Dim rng As Range, Cel, ms As Worksheet, ws As Worksheet, k, NR&
Set ms = Sheets("Search")...
Hi excel gods :)
I am searching for an value in column C of a worksheet. If the exact value is found (it will be a unique value on each row), I need to check the whole row and return the column header name for each cell which has the value "Y". For example, if I searched for and located 123...
You're right: It does look anywhere on the sheet, but the value will be in column O. Originally, there were some sheets it appeared elsewhere, but as I need to be more and more specific, I got everyone to agree to keep the numbers in column O (at least I won that battle).
Not sure why, but the...
Sorry for the fat fingers... I should mention that the values returned from Column O and from Column B are the same on each worksheet. Only the worksheet names differ.
I have corrected the copy statement (thanks again).
When the search criteria is located on a sheet, it is returning:
The value from Column B of that sheet into C6 of LOOKUP.
It is returning the value of Column O (the whole cell, which includes the search criteria) into D6 of sheet LOOKUP...
Thanks very much for that. But I just don't know how to tell it (using this code) to search on Sheet1, Sheet2 and Sheet3 instead of the whole workbook (there could be many sheets). That's my main problem.
Sorry for the lack of detail. And let me add, I'm no great VBA expert - I work with what I've got. Let me try to elaborate...
The search works fine right now. It searches every sheet in the workbook for the search criteria (the id is always in column O right now).
The -13 gets me the value...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.