Jump to content

Wikipedia:Reference desk/Archives/Computing/2021 July 4

From Wikipedia, the free encyclopedia
Computing desk
< July 3 << Jun | July | Aug >> Current desk >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


July 4[edit]

copying from pdf[edit]

I have a pdf document. It has a table. Each row has a person's name and his details. I want to separate girls row and boys rows to store in separate documents. Is there a simple way to do it. Of course I can copy paste each but it has 50 rows so this method is not efficient. In the name column, every boy name is preceded by M and girl name by F.

| 1 | M boyname | detail |
| 2 | F girlname | detail |
  • Assuming you're importing into excel, you should be able to copy the lot and save to a text file. Excel has a pretty flexible import function you can play around with. It does say you can specify the separator character, and this worked well when I tried it with your example. Fgf10 (talk) 16:07, 4 July 2021 (UTC)[reply]
(E/C) You can do it easily enough once the material is copied into Excel. Let's assume you copy-paste it in three columns (the number, the name, and the detail), with those headers at the top, so that the first actual name is in cell B2. Call column D "boy name", column E "boy detail", column F "girl name", and column G "girl detail". In cell D2 enter this: =IF(LEFT(B2,1)="M",MID(B2,3,99),"") or, if you want to keep the Ms and Fs, =IF(LEFT(B2,1)="M",B2,"") but I'm assuming you no longer want/need the gender marker since they'll be different sets anyway. You'd enter similar formulas in the other three columns: E would be =IF(LEFT(B2,1)="M",C2,"") F would be =IF(LEFT(B2,1)="F",MID(B2,3,99),"") and G would be =IF(LEFT(B2,1)="F",C2,""). Highlight the cells with formulas we just made and drag them down until all the data is split.
At this point, beside your original data you've now got four columns that looks kind of patchy since they're filled with blanks. Copy the four columns we created and then paste values onto the same area so that the formulas are gone. Now you can sort the list by any of the four columns we created and you'll get the boys and girls in separate chunks you can copy to use elsewhere. Matt Deres (talk) 16:16, 4 July 2021 (UTC)[reply]

Thank you both of you, It really saved my lot of time 🙏😇 — Preceding unsigned comment added by 117.196.178.73 (talk) 11:13, 5 July 2021 (UTC)[reply]