+ Reply to Thread
Results 1 to 23 of 23

Excel Query

  1. #1
    Registered User
    Join Date
    09-17-2010
    Location
    FL
    MS-Off Ver
    Excel 2003
    Posts
    13

    Question Excel Query


    I was given a query at work to re work into a new format. I was able to move the columns to the right order but some we still have to edit and fill in our selfs. For example Column B will always be the letter R yet i cant figure out how to set excel up to auto fill all the needed rows in that column with the letter R.

    The next thing im stuck on is Column D displays the pulled product ID from our server.
    Some IDs have "-BER" on the end of them showing it is a bad product. Im trying to see if there is a way to say "scan" column D for the phrase "BER" and auto cut and paste that info into column L but in the same row.


    Im running Excel 2003 on a windows 2000 pc Any help you guys can give would be amazing.
    Last edited by justincase_2008; 09-17-2010 at 10:18 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel Query

    What Query do you mean, is it from a database?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    09-17-2010
    Location
    FL
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Excel Query

    Quote Originally Posted by royUK View Post
    What Query do you mean, is it from a database?
    Yes a horrible sql database that looks like a 5 year old set up.

    I can run the query and then copy the info into a normal worksheet.
    If that will help with changing the column data.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel Query

    can you attach an example workbook to demonstrate the layout?

  5. #5
    Registered User
    Join Date
    09-17-2010
    Location
    FL
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Excel Query

    Quote Originally Posted by royUK View Post
    can you attach an example workbook to demonstrate the layout?
    Yes give me a minute to get it. Im VNCing to the pc that can run the query.

  6. #6
    Registered User
    Join Date
    09-17-2010
    Location
    FL
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Excel Query

    Here is the file. I added comments to the columns i was talking about.

    Templete file.xls

  7. #7
    Registered User
    Join Date
    09-17-2010
    Location
    FL
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Excel Query

    Any ideas?

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel Query

    This formula in L2 & copied down

    =IF(RIGHT(D2,3)="BER",RIGHT(D2,3),"")

  9. #9
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Excel Query

    Excel tells me "File is corrupt and cannot be opened". I'm curious to know why?!
    Attached Images Attached Images
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  10. #10
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel Query

    It opens for me

  11. #11
    Registered User
    Join Date
    09-17-2010
    Location
    FL
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Excel Query

    Quote Originally Posted by royUK View Post
    This formula in L2 & copied down

    =IF(RIGHT(D2,3)="BER",RIGHT(D2,3),"")
    How do i use this formula? I have never done anything like this in excel this is all new grounds to me so sorry for asking what should be a simple thing to do. And would i have to put anything special in the Formula since sometimes the data can go all the way down to 200-300+ product IDs?

  12. #12
    Registered User
    Join Date
    09-17-2010
    Location
    FL
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Excel Query

    Quote Originally Posted by contaminated View Post
    Excel tells me "File is corrupt and cannot be opened". I'm curious to know why?!
    Im not sure i can open with my windows and my Ubuntu PCs.

  13. #13
    Registered User
    Join Date
    09-17-2010
    Location
    FL
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Excel Query

    I got the Formula pasted into L2 and edited it to a row that has "-BER" in it and its not pulling the data over to L. And from what i see in the formula ill have to write out D2,3,4,5 and so on to cover all of the rows right?

    =IF(RIGHT(D80,3)="BER",RIGHT(D80,3),"")
    Last edited by justincase_2008; 09-17-2010 at 09:02 AM.

  14. #14
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel Query

    It works in your example sheet

  15. #15
    Registered User
    Join Date
    09-17-2010
    Location
    FL
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Excel Query

    I got it all working now. I forgot to drag it all the way down. THANK YOU!!! Now the only thing i have to do is rework the formulas to place a R and 1 in the other rows. The only thing left is after i run the query i copy it and pase it into the templet file and let the formulas do there work. Then i have to copy it again and paste special (value) it to a new spread sheet to get rid of the -BER in column D without killing my Column L data. So this saves me a lot of time. THANK YOU so much for your help. If you need anything (besides excel work) im here.
    Last edited by justincase_2008; 09-17-2010 at 09:22 AM.

  16. #16
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel Query

    You don't need to copy & paste, try using AutoFilter
    Last edited by royUK; 09-17-2010 at 10:22 AM.

  17. #17
    Registered User
    Join Date
    09-17-2010
    Location
    FL
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Excel Query

    How would i do the auto filler?
    I know i can put a R and on th lower right hand side drag that down and fill but is there a way to auto fill the column if there is data in the same row?
    Last edited by justincase_2008; 09-17-2010 at 09:49 AM.

  18. #18
    Registered User
    Join Date
    09-17-2010
    Location
    FL
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Excel Query

    nvm i just went ahead and filled the template sheet to have both rows already filler with R and the 1.

  19. #19
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel Query

    If you put an R in the cell, hover the cursor over the bottom right corner of the cell it will change to cross hairs(+), then double click. It will fill down.

    I meant to use AutoFilter to remove unwanted rows

  20. #20
    Registered User
    Join Date
    09-17-2010
    Location
    FL
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Excel Query

    Quote Originally Posted by royUK View Post
    If you put an R in the cell, hover the cursor over the bottom right corner of the cell it will change to cross hairs(+), then double click. It will fill down.

    I meant to use AutoFilter to remove unwanted rows
    all right that will have to work for him. Thanks again for all the help.

  21. #21
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel Query

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  22. #22
    Registered User
    Join Date
    09-17-2010
    Location
    FL
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Excel Query

    Done. And thanks again.

  23. #23
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel Query

    Glad we helped

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1