Hello, I have a problem that's probably very simple to solve:
I want a macro that searches for the word "NF" (without quotes) in column B. If true, than for that row for the columns D to AV, it should copy the value of the cell above.
Hello, I have a problem that's probably very simple to solve:
I want a macro that searches for the word "NF" (without quotes) in column B. If true, than for that row for the columns D to AV, it should copy the value of the cell above.
Hi, kurtwagner,
you could either use Find which would deliver a Range-Object if the searched item is found (and the use the row of that range to build the range to copy the values, you may refer to the VBA-Help on that topic) or Application.Match which would either deliver an error or the row number which then could be used as before.
Ciao,
Holger
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
hi kurtwagner. there are many assumptions & questions involved here, so i suggest you upload a sample Excel file for us to help you better.
1. which column is sure to be filled (so that i can identify the last row)?
2. which row do you start in?
3. do you want to find the exact word "NF" or whether the cell contains "NF"?
4. if row 2 & 3 contains "NF", row 2 will be based on row 1's data & row 3 on row 2's data? so they actually all have the same data for this case?
for exact word:
for finding cell that contains "NF":Please Login or Register to view this content.
assumptions were that i can find last row in column B & data starts from row 2Please Login or Register to view this content.
Thanks, if you have clicked on the * and added our rep.
If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".
"Contentment is not the fulfillment of what you want, but the realization of what you already have."
Tips & Tutorials I Compiled | How to Get Quick & Good Answers
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks