Query Based on Field Name not Data

Mississippi Girl

Board Regular
Joined
Oct 27, 2005
Messages
155
I have a spreadsheet that is uploaded into Access (much help on the excel board has made it perfect - thanks!!). The way the data comes across has the months listed as field names. Is it possible to select data for just one month with the months being the field names, without making 12 different queries and reports?

I've attempted to post a sample of what the current report looks like; using the HTML tags makes it ledgible - kinda...basically, I want to run a report on a month that is selected via a message box instead of running the entire year.

HTML:
  ODIN Benefitor          OCT     NOV     DEC    JAN     FEB     MAR     APR     MAY     JUN     JUL    AUG     SEP
  1MS1                      -0.03 %   0.00 %  0.00 %   0.00 %  0.00 %   0.00 %   0.00 %   0.01 %   0.45 %
  9T05                        0.00 %   0.00 %  0.01 %   0.00 %  0.00 %   0.00 %   0.01 %   0.00 %   0.00 %
  AC11                       0.03 %   0.00 %  0.00 %   0.01 %  0.03 %   0.00 %   0.00 %   0.00 %   0.00 %
  AD41                      0.07 %   0.01 %  0.00 %   0.00 %  0.00 %   0.00 %   0.03 %   0.04 %   0.97 %
  AE11                       0.00 %   0.00 %  0.00 %   0.00 %  0.01 %   0.00 %   0.00 %   0.00 %   0.00 %
  AE81                       0.00 %   0.00 %  0.00 %   0.00 %  0.35 %   0.12 %   0.07 %   0.19 %   0.24 %
  AF11                       0.00 %   0.00 %  0.00 %   0.00 %  0.00 %   0.00 %   0.00 %   0.00 %   0.07 %
  AF81                       0.00 %   0.00 %  0.00 %   0.00 %  0.00 %   0.00 %   0.00 %   0.00 %   2.81 %
  AG11                       0.16 %   0.15 %  0.29 %   0.32 %  0.51 %   0.20 %   0.29 %   0.10 %  -0.45 %
  AG81                       0.60 %   0.70 %  0.56 %   0.74 %  2.14 %   1.85 %   1.80 %  -0.16 %    17.72%
  AR11                       0.20 %   0.41 %  0.34 %   0.39 % -0.12 %   0.02 %   0.00 %   0.00 %   0.00 %

<META content=Word.Document name=ProgId><META content="Microsoft Word 11" name=Generator><META content="Microsoft Word 11" name=Originator><LINK href="Hours%20with%20Benefitor%20Roll%20Up%20and%20Title2_files/filelist.xml" rel=File-List><STYLE><!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;}@page Section1 {size:8.5in 11.0in; margin:.5in 1.0in .5in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;}div.Section1 {page:Section1;}--></STYLE>
 
Joe4, used the code you gave me, made a few adjustments and now I have a functional product to use!

Thanks sooooooo much!
 
Upvote 0

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Great! Glad you got it all to work out.
 
Upvote 0

Forum statistics

Threads
1,215,532
Messages
6,125,358
Members
449,221
Latest member
chriscavsib

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top